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("ADODB.Connection"
connection.Open("credit"
query = "SELECT * FROM credInfo WHERE name = '" & _
CStr (Request ("name"
) &"'"
Set data = Server.CreateObject("ADODB.RecordSet"
data.Open query, connection
If data.EOF Then
insert = "INSERT INTO credInfo VALUES ('" & _
CStr (Request ("name"
) & "','" & _
CStr (Request ("add1"
) & "','" & _
CStr (Request ("add2"
) & "','" & _
CStr (Request ("tele"
) & "','" & _
CStr (Request ("cardType"
) & "','" & _
CStr (Request ("cardNum"
) & "','" & _
CStr (Request ("exp"
) & "')"
connection.Execute(insert)
data.Close()
connection.Close()
Response.Redirect("choose.asp"
Else
data.Close()
connection.Close()
Response.Redirect("incorrect.asp"
End If
%>
any help would be greatly appreciated!!!
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("ADODB.Connection"
connection.Open("credit"
query = "SELECT * FROM credInfo WHERE name = '" & _
CStr (Request ("name"
Set data = Server.CreateObject("ADODB.RecordSet"
data.Open query, connection
If data.EOF Then
insert = "INSERT INTO credInfo VALUES ('" & _
CStr (Request ("name"
CStr (Request ("add1"
CStr (Request ("add2"
CStr (Request ("tele"
CStr (Request ("cardType"
CStr (Request ("cardNum"
CStr (Request ("exp"
connection.Execute(insert)
data.Close()
connection.Close()
Response.Redirect("choose.asp"
Else
data.Close()
connection.Close()
Response.Redirect("incorrect.asp"
End If
%>
any help would be greatly appreciated!!!