Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 OPENRECORDSET error

Author  Topic 

kathunter
Starting Member

35 Posts

Posted - 2002-02-26 : 14:35:29
The below code is giving me an error:
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'Microsoft.Jet.OLEDB.4.0'.

Is there another method for accessing access db's in OPENROWSET? BOL just gae this example.

/* code follows */

SELECT a.featured, a.gamerank, a.gamename, a.package_no, a.gamepublisher, a.platform, a.game_new, a.downloadsize, a.genre
, s.labelnote
FROM dlproperties as s

INNER JOIN
OPENROWSET ('Microsoft.Jet.OLEDB.4.0','d:\games_database.mdb';'';'',qurTop50) as a

ON s.packageID=a.packageID

set oRS=objConnection.execute(SQL)

chadmat
The Chadinator

1974 Posts

Posted - 2002-02-26 : 14:58:29
Are you running this in QA? OR through VB?

It looks like T-SQL, but then you try to execute it through an ADO connection? (I don't see you setting the SQL variable)

Try running this code in Query Analyzer. Also, is qurTop50 a table in your access db?

-Chad

Go to Top of Page

kathunter
Starting Member

35 Posts

Posted - 2002-02-26 : 17:12:35
I am running this in Query Analyzer.
qurTop50 is my stored proceedure
Go to Top of Page
   

- Advertisement -