Need help with filter session variable statement Watch

rayrob
Badges: 0
Rep:
?
#1
Report Thread starter 8 years ago
#1
I have verified a unique user name and eventually they will enter in more information to update the database but I just want this statment to work so I am only requesting the password right now and I want to filter the User Name that they just entered and add to it


This is what I am using:

oRecSet.Filter = "dbMbrs_UsrNm" = Session("UsrNm")

I have tried the following as well with no luck:

oRecSet.Filter = "dbMbrs_UsrNm=" & Session("UsrNm")

Here is the script:


<%
dim oRecSet, oCM 'declare connection object

set oRecSet = Server.CreateObject("ADODB.Recor dset")

oRecSet.Open "Members", objConn, adOpenDynamic, adLockOptimistic, adCmdTable

oRecSet.Filter = "dbMbrs_UsrNm" = Session("UsrNm")
oRecSet("dbMbrs_PssWrd") = Request.Form("txtBxPssWrd")
oRecSet.Update
oRecSet.close

Set oRecSet = Server.CreateObject("ADODB.Recor dSet")

SQL = "SELECT * FROM Members"
oRecSet.open SQL,objConn,0,1,adcmdText

%>

I sure would appreciate some advice.

Thanks

Resolved

<%
dim oRecSet, oCM, User

set oRecSet = Server.CreateObject("ADODB.Recor dset")

oRecSet.Open "Members", objConn, adOpenDynamic, adLockOptimistic, adCmdTable

User = session("UsrNm")

oRecSet.F ilter = "dbMbrs_UsrNm = ' " & User & " ' "

oRecSet("dbMbrs_PssWrd") = Request.Form("txtBxPssWrd")
oRecSet.Update
oRecSet.close

Set oRecSet = Server.CreateObject("ADODB.Recor dSet")

SQL = "SELECT * FROM Members"
oRecSet.open SQL,objConn,0,1,adcmdText

%>
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Have you registered to vote?

Yes! (212)
39.41%
No - but I will (38)
7.06%
No - I don't want to (36)
6.69%
No - I can't vote (<18, not in UK, etc) (252)
46.84%

Watched Threads

View All