Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error '80040e14'

Status
Not open for further replies.

crxcte1

Programmer
May 22, 2003
74
US
Anyone see why I get the error? I can run this in the access query manually and it works fine.

Set cn = Server.CreateObject("ADODB.Connection")
cn.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" & server.MapPath("/_database/db2004.mdb")
cn.Open
SQL="insert into table1 (Session,[Product Discription],Color,Qty,Price) values ('" &SessionID&"','"&Size&"','"&Color&"','"&Qty&"','"&Price&"')"
cn.Execute(SQL)
cn.close
set cn=nothing

[upsidedown]
 
Are Session,[Product Discription],Color,Qty,Price all text fields? I would think that Qty and Price would be numeric? Your error message is very odd. You would need to provide information regarding your table structure.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
The table structure is all text except for the primary key which is autonumber.

This doesn't work either (error 80004005);
SQL="Select [Product Discription],Color,Qty,Price from table1 where Session = '" & SessionID & "' "

but this will work;
SQL="Select count(*) from table1 "

seems like a simple problem but it driving me to my knees.
 
seems session is a reserved word. I changed it to mySession and it worked....

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top