Solved

MS Access, ASP Error: Microsoft OLE DB Provider for ODBC Drivers error '80040e14', The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation..

Posted on 2003-10-23
8
787 Views
Last Modified: 2012-08-14
Hi,

I am using MS Access for my application. But when the transaction is started then I get the following error message :

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
 
[Microsoft][ODBC Microsoft Access Driver] The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.

I am using DSN less connection string in ASP page.

I ckecked out everything but it didn't work after changing the name of the variables.

Can someone please help me.

Thanks in advance..

yagya
0
Comment
Question by:yagya_amita
8 Comments
 
LVL 6

Accepted Solution

by:
Mach1pro earned 75 total points
ID: 9607262
You need to post your connection string
0
 
LVL 2

Expert Comment

by:Smilesxl
ID: 9607283
Need more information.  Would help to see the query code.
0
 

Author Comment

by:yagya_amita
ID: 9610488
Sorry I forgot to put the connection string and the query being used. They are as follows :

set con = server.createobject("ADODB.connection")
    con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq= --my data path"
if mygroup = "Test Mail" then
     con.close
  con.open "Driver={Microsoft Access Driver (*.mdb)};dbq= my data path"
     mysql = "select email from email"
    set rs = con.execute(mysql)
end if
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 6

Expert Comment

by:Mach1pro
ID: 9610579
Try dimming the rs as a recordset

Dim rs
SET rs= Server.CreateObject("ADODB.recordset")
set con = server.createobject("ADODB.connection")
con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq= --my data path"
if mygroup = "Test Mail" then
   con.close
   con.open "Driver={Microsoft Access Driver (*.mdb)};dbq= my data path"
    mysql = "select email.* from email"
   rs.ActiveConnection = con
  rs.Open str, con,1,2
end if
0
 

Author Comment

by:yagya_amita
ID: 9612043
I tried above.But again I am getting the same error message.
0
 
LVL 6

Expert Comment

by:Mach1pro
ID: 9613639
Here is how I am connecting to a database on websites Almost word for word


Dim db
Dim rs
Dim str

db = "driver={Microsoft Access Driver (*.mdb)};dbq= --Data Path--;"
      'OR use this connection string
'db = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= -- Data Path --;"
SET rs= Server.CreateObject("ADODB.recordset")
       
str = "SELECT Email.* FROM Email"      
rs.ActiveConnection = db
rs.Open str, db,1,2
If rs.Recordcount > 0 then
   rs.movefirst
   response.write rs(0)       
End If
rs.Close
0
 
LVL 39

Expert Comment

by:stevbe
ID: 9991017
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: Mach1pro {http:#9613639}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

stevbe
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now