RE: FN-FORUM ASP opportunity
date posted 29th September 2002 15:04
Hi John
> dmdTemp.CommandText="INSERT INTO `homepage`
>(description,twso,price)VALUES('"+description+"','"+twso+"',''"+price+"')"
Try putting spaces before and after all keywords (except before the first
INSERT),
remove the extra ' in "',''"+price+"')",
I assume the + signs are really &, put spaces around them also,
don't put quotes around the table name,
and lastly finish with a ;.
dmdTemp.CommandText="INSERT INTO homepage " _
& "(description,twso,price) VALUES ('" & description & "','" & twso & "','"
& price & "');"
Hope this helps, this is my first post on the forum.
Regards
Kevan Froud
-----Original Message-----
From: [EMAIL REMOVED]
[EMAIL REMOVED] Behalf Of john anslow
Sent: 29 September 2002 12:48
To: [EMAIL REMOVED]
Subject: FN-FORUM ASP opportunity
Hi guys,
need a bit of help from the asp gurus amongst you.
I'm using a direct connection to an access db which works fine for
select statements but errors for inserts, here's the code I'm using and
the error I'm getting.
Can anyone cast any light on why it's not working?
Set dmdTemp = Server.CreateObject("ADODB.Connection")
dmdTemp.Provider = "Microsoft.Jet.OLEDB.4.0"
dmdTemp.ConnectionString = "Data
Source=d:websitessitenamefolderdatadtabase.mdb;"
dmdTemp.Open
dmdTemp.CommandText="INSERT INTO `homepage`
(description,twso,price)VALUES('"+description+"','"+twso+"',''"+price+"')"
dmdTemp.CommandType=1
dmdTemp.Execute
gives me the following error
Microsoft VBScript runtime error '800a01be'
Object doesn't support named arguments: 'CommandText'
/cccomputing/scripts/addahp.asp , line 18
TIA,
John