RE: Calling Access 97 queries with ASP
by Andrew Browne <andrew(at)pbm.co.za>
|
| Date: |
Wed, 16 Aug 2000 09:03:29 +0200 |
| To: |
"'hwg-languages(at)hwg.org'" <hwg-languages(at)hwg.org> |
| |
todo: View
Thread,
Original
|
|
Hi and thanks for the replies to my question. It turns out that the sql =
string that I used needed a preceding EXECUTE like so: "EXECUTE =
A_qOccurrences" where A_qOccurrences is the name of the query. SQL =
Server requires only the name of the procedure in the CommandText =
string.
_____________
Andrew Browne
IT
658-6484 =20
_____________
----------
From: Rob Taylor[SMTP:rob(at)tconsult.com]
Reply To: rob(at)tconsult.com
Sent: 15 Aug 2000 05:33
To: hwg-languages(at)hwg.org
Subject: RE: Calling Access 97 queries with ASP
Databaseoccur would need to say something like
"SELECT * from tblData Where LastName =3D 'someone'"
Rob Taylor
Taylor Consulting
Specializing in ASP/SQL Inventory Systems
208-882-9398
rob(at)tconsult.com
www.tconsult.com
More to offer !!
* -----Original Message-----
* From: Andrew Browne [mailto:andrew(at)pbm.co.za]
* Sent: Tuesday, August 15, 2000 9:14 AM
* To: 'hwg-languages(at)hwg.org'
* Subject: Calling Access 97 queries with ASP
* =20
* =20
* Hi all
* =20
* I normally use ASP with non-parametised SQL Server=20
* procedures like this:
* Set AdoCommand =3D Server.CreateObject("ADODB.Command")
* Set AdoCommand.ActiveConnection =3D Session("Conn")
* Set OccRS =3D Server.CreateObject("ADODB.RecordSet")
* DatabaseOccur =3D "A_qOccurrences"
* AdoCommand.CommandText=3DDatabaseOccur
* OccRS.MaxRecords =3D 300
* OccRS.open AdoCommand
* =20
* I have tried to use the same sort of code whilst connecting=20
* to an Access database with a non-parametised query. =20
* However, I receive the following error:
* Invalid SQL statement; expected 'DELETE', 'INSERT',=20
* 'PROCEDURE', 'SELECT', or 'UPDATE'.
* =20
* Can anyone help with me with the SQL statement I need to=20
* pass to Access. Sorry if this is a dumb question - I've=20
* never really used Access before.
* =20
* Thanks in advance
* =20
* _____________
* Andrew Browne
* IT
* 658-6484 =20
* _____________
* =20
* =20
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.