insert into table using ASP

P

Perry

Hello everybody,
I was using ACCESS 2000 Before, I have created a few web site using ASP &
Access 2000. Now I have switch to Access 2003 and some of the code is not
working any more. The main one is "INSERT INTO" the following is my code:
Set oConn = Server.CreateObject("ADODB.connection")
Set oRS = Server.CreateObject("ADODB.recordset")
Cstring = "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" &
Server.MapPath("onlineShop.mdb") & ";"
oConn.Open(Cstring)
sql2 = "insert into MT([MID], [MKind], [Surname],
[FirstName],[Gender],,[Address1],[Address2],[Address3],[PostCode],[Country],[TelNo],[Password])
values ('" & UCase(MID) &"','"& MKind &"','" & Surname & "', '" & FirstName &
"', '" & Gender &"','" & Email &"','" & Address1 &"','" & Address2 &"','" &
Address3 &"','" & PostCode &"','" & Country &"','" & TelNo &"','" & Password
&"')"
oConn.execute sql2

it produce any error message saying " I have to use update query" ???
but these code work fine with Access2000, so please help me out !
thankyou very much
 
D

Duane Hookom

Are you sure your error message doesn't say something like "You must use an
updateable query"?
Is your database readonly?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top