Can't insert into database
I'm having trouble figuring out what is wrong with my query. I have the following code:
dim objConn, rsStudents, strSql
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Mode = adModeReadWrite
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\IMI\StudentData.mdb;"
fName="Karen"
lName="Cote"
ssn="3496"
strSql = "INSERT INTO Students (FirstName, LastName, SSN) VALUES ('" & fName & "','" & lName & "','" & ssn & "')"
objConn.Execute(strSql)
returnVal=0
%><body>&returnVal=<%=returnVal%>
However, when I try to view the ASP page, I get an "Operation must use an updateable query." error on the Execute line. What does this mean and what do I need to do to fix it?
Chris
|