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
789 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Flowing down data to other tables 13 32
update access form field from 5 other form fields 1 15
Setting a recordset out of a parameter query 12 29
UK Date format in MS Access 4 21
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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…

856 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