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
783 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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

760 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

20 Experts available now in Live!

Get 1:1 Help Now