ASP Error on INSERT INTO Statement

G

Guest

Hi

I'm getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] The INSERT INTO statement contains
the following unknown field name: 'ClientName'. Make sure you have typed the
name correctly, and try the operation again.


I have checked the field names in the database numerous times and I can't
find anyting wrong with them. The IIS servere has the approriate permissions
to the Access database.

When I run the query from access it sucessfully inserts the row. Thanks in
advance for your help and here is my code:

set objCmd = server.CreateObject("adodb.command")
set objCmd.ActiveConnection = oUnifiedConn

DIM strTest
strTest = "INSERT INTO Client (ClientName) VALUES ('" & strName & "');"
response.Write strTest

objCmd.CommandText = strTest
'objCmd.CommandType = adCmdtext
objCmd.Execute ' line 82

Thanks Mark
 
J

JD

Try:

strTest = "INSERT INTO Client (ClientName) VALUES ('" & strName & "')"

or

strTest = "INSERT INTO Client ([ClientName]) VALUES ('" & strName & "')"


JD.
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top