hello,
I am having some difficulties passing a field in my asp script.
I have an access DB where I have 4 fields username,userid password, link. I have a Dim in my asp script that gets the userid, if I try to add another DIM to get the username, I get an error
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
test.asp, line 19
and here is line 19 salesrep=rs("username")
here is what my code looks like
Username = Request.Form("txtUsername")
Password = Request.Form("txtPassword")
'Build connection with database
set conn = server.CreateObject ("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath ("test.mdb")
set rs = server.CreateObject ("ADODB.Recordset")
'rs.Open "SELECT userid FROM yourtable Where Where FECHNB='" & Session("Username")& "'", conn
rs.Open "SELECT userid FROM userlist where username='" & Session("Username")& "'", conn, 1
Dim presentuserid
presentuserid=rs("userid")
dim salesrep
salesrep=rs("username")
set conn = server.CreateObject ("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath ("stats.mdb")
set rs = server.CreateObject ("ADODB.Recordset")
conn.Execute "Insert into log (commission ) VALUES ('" & salesrep & "' )"
the test.db is where my username password userid link are stored and the stats.mbd is where I am trying to insert the username. I can isert the userid but not the user name
help please!!
I am having some difficulties passing a field in my asp script.
I have an access DB where I have 4 fields username,userid password, link. I have a Dim in my asp script that gets the userid, if I try to add another DIM to get the username, I get an error
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
test.asp, line 19
and here is line 19 salesrep=rs("username")
here is what my code looks like
Username = Request.Form("txtUsername")
Password = Request.Form("txtPassword")
'Build connection with database
set conn = server.CreateObject ("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath ("test.mdb")
set rs = server.CreateObject ("ADODB.Recordset")
'rs.Open "SELECT userid FROM yourtable Where Where FECHNB='" & Session("Username")& "'", conn
rs.Open "SELECT userid FROM userlist where username='" & Session("Username")& "'", conn, 1
Dim presentuserid
presentuserid=rs("userid")
dim salesrep
salesrep=rs("username")
set conn = server.CreateObject ("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath ("stats.mdb")
set rs = server.CreateObject ("ADODB.Recordset")
conn.Execute "Insert into log (commission ) VALUES ('" & salesrep & "' )"
the test.db is where my username password userid link are stored and the stats.mbd is where I am trying to insert the username. I can isert the userid but not the user name
help please!!