|
-
Jul 4th, 2001, 02:53 AM
#1
Thread Starter
Fanatic Member
Error in Insert statement
I used PWS (win98 ) in testing my asp scripts in my pc and everything was going alright. I uploaded my asp scripts to brinkster.com and even before I uploaded them and used IIS, I was getting a SYNTAX ERROR in INSERT statements (sql) when adding a new record to a table which has an autonumber field (I got no problem with tables without an autonumber field). I tried to use the syntax RS.AddNew but the error I got was "Provider does not support this action" (something like that) . I am confused since with PWS, using the same script, everything was fine. Please help me... By the way I am using Microsoft Access fo rmy database.
On Error GoTo Hell
Hell:
Kill Me
Food For Thought:
- Do not judge a book... if you're not a judge!

-
Jul 4th, 2001, 03:32 AM
#2
Frenzied Member
Um... post the insert statement...
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
-
Jul 4th, 2001, 04:41 AM
#3
Thread Starter
Fanatic Member
OK, tnx for your time, here it is:
SQLStmt = "INSERT INTO users "
SQLStmt = SQLStmt & "(UserName, PassWord, Name, Course, School, email, DateRegistered)"
SQLStmt = SQLStmt & "VALUES('" & vUserName & "','" & vPword1 & "','" & vName & "', '" & vCourse & "', '" & vSchool & "', '" & vEmail & "', '" & vDate & "')"
Set RS = Connection.Execute(SQLStmt)
On Error GoTo Hell
Hell:
Kill Me
Food For Thought:
- Do not judge a book... if you're not a judge!

-
Jul 4th, 2001, 04:51 AM
#4
New Member
With ms access, shouldn't you surroud dates with ## not ' '?, don't know if that's the problem, bu might be worth a try.
-
Jul 4th, 2001, 03:02 PM
#5
Hyperactive Member
Let me see your connection string please
Top Tip: You can make friends and impress the opposite sex at geeky cocktail parties by saying "DB" instead of database. - Karl Moore
-
Jul 5th, 2001, 12:33 AM
#6
Thread Starter
Fanatic Member
ok here it is:
ConnectStr = "Provider=Microsoft.Jet.OLEDB.4.0;"
ConnectStr = ConnectStr & "Data Source=" & Server.MapPath("/eimroda/db/data.mdb") & ";"
With Connection
.ConnectionTimeout = 15
.CommandTimeout = 30
.ConnectionString = ConnectStr
.Open
End With
On Error GoTo Hell
Hell:
Kill Me
Food For Thought:
- Do not judge a book... if you're not a judge!

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|