Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Old insert/update script suddenly not working!


Message #1 by "Erik Ottengren" <erik.ottengren@t...> on Tue, 9 Apr 2002 15:23:45
Hi!

Hope someone can help. I have a script that I have used on a different 
site without any problem, but when starting to build a new site the 
following script does not work properly.

<%
Dim rsUsers, sField
set rsUsers=Server.CreateObject("ADODB.Recordset")
rsUsers.Open "Kunder", db, adOpenForwardOnly, adLockOptimistic, adCmdTable
rsUsers.Filter="KundNr= '" & Request.Form("KundNr") & "'"
	If rsUsers.EOF Then
	rsUsers.AddNew
	End If
rsUsers("CompanyName")=Request.Form("CompanyName")
rsUsers("StreetAddress")=Request.Form("StreetAddress")
rsUsers("Zip")=Request.Form("Zip")
rsUsers("PostAddress")=Request.Form("PostAddress")
rsUsers("Phone")=Request.Form("Phone")
rsUsers("ContactName")=Request.Form("ContactName")
rsUsers("PhoneContact")=Request.Form("PhoneContact")
rsUsers("Email")=Request.Form("Email")
rsUsers("Date")=Request.Form("Date")
rsUsers("Active")=True
rsUsers.Update
Dim strName, value
For Each sField In rsUsers.Fields
strName=sField.Name
value=sField.value
Session(strName)=value
Next
Session("bValidUser")=True
Response.Redirect "dspAddBekr.asp"
%>

It gives this error message;

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO 
statement.
/Digitalflag/actAddKund.asp, line 86

Not sure if you need the script on the previous page as well. Will wait 
for your reply first. :-)

Greatful for help.
Message #2 by "Tom Wellige" <wellige@s...> on Fri, 12 Apr 2002 11:56:04
Hi,

I have exactly the same problem after running my ASP pages on an IIS on XP 
professional instead of Win2k professional.

I have installed Access 2000, SQL 7 (MSDE) and MDAC 2.7 on my machine and 
assume that this is some kind of an ODBC driver error, like incompatible 
file versions.

Is there somebody out there with an idea ?

I have already reinstalled the latest MDAC version with no success.



Best regards, Tom.

  Return to Index