Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp database update prob!!!!

Status
Not open for further replies.

tuam1234

Technical User
Feb 6, 2004
52
IE
could ye please help. when i try to add to the database,k i get the error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/paycheck.asp, line 50

when running the following code:

<%

'Dimension variables
Dim connection
Dim check
Dim data
Dim insert
Dim query


Set connection = Server.CreateObject(&quot;ADODB.Connection&quot;)

connection.Open(&quot;credit&quot;)

query = &quot;SELECT * FROM credInfo WHERE name = '&quot; & _
CStr (Request (&quot;name&quot;)) &&quot;'&quot;


Set data = Server.CreateObject(&quot;ADODB.RecordSet&quot;)

data.Open query, connection

If data.EOF Then

insert = &quot;INSERT INTO credInfo VALUES ('&quot; & _
CStr (Request (&quot;name&quot;)) & &quot;','&quot; & _
CStr (Request (&quot;add1&quot;)) & &quot;','&quot; & _
CStr (Request (&quot;add2&quot;)) & &quot;','&quot; & _
CStr (Request (&quot;tele&quot;)) & &quot;','&quot; & _
CStr (Request (&quot;cardType&quot;)) & &quot;','&quot; & _
CStr (Request (&quot;cardNum&quot;)) & &quot;','&quot; & _
CStr (Request (&quot;exp&quot;)) & &quot;')&quot;

connection.Execute(insert)

data.Close()
connection.Close()
Response.Redirect(&quot;choose.asp&quot;)

Else

data.Close()
connection.Close()
Response.Redirect(&quot;incorrect.asp&quot;)

End If




%>

any help would be greatly appreciated!!!


 
it's a classic.


hth,
Foxbox
ttmug.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top