Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to insert with ASP
Message
From
02/07/2007 14:47:52
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
How to insert with ASP
Miscellaneous
Thread ID:
01237206
Message ID:
01237206
Views:
49
Given the following code:
<%
Set oConn = Server.CreateObject("ADODB.Connection")
ConnStr = "Driver=Microsoft Visual Foxpro Driver; UID=userID;SourceType=DBC;SourceDB=G:\INetPAG\TIPApplication\RegionalBids\Data\bidsdata.dbc"
oConn.Open ConnStr

lcUser = trim(request.form("user"))
lcPassword = trim(request.form("password"))
lnAuthlevel = -1

if lcUser <> "" and lcPassword <> "" then
   sql = "select * from users where username = '" & lcUser & "' and password = '" & lcPassword & "'"
   Set oUser = oConn.Execute(sql)
   lnAuthlevel = cdbl(oUser("authorization"))
   session("authlevel") = lnAuthlevel
end if

if lcUser <> "" then
if lnAuthlevel > 0 then
     sql = "insert into xlogins (username) values ('Test')"
     set oLogin = oConn.Execute(sql)     && it fails here
end if
end if
%>
reading and verifying the login works fine. But the attempt to record the login into the xlogins table results in an error that says 'unable to update the cursor'. Am I missing something simple or is there another technique needed here?

Thanks
Next
Reply
Map
View

Click here to load this message in the networking platform