Groups | Blog | Home
all groups > sql server msde > october 2004 >

sql server msde : How to OPENDATASOURCE ?


Nieurig
10/27/2004 6:19:36 AM
Hello Folks,
i use MSDE to collect data from a Access-Databases.
I'f got the following SELECT-Statement from this newsgroup
yesterday:

SELECT count(*)
FROM OPENDATASOURCE(
'Microsoft.Jet.OLEDB.4.0',
'Data Source=C:\\TEMP\\FLS.mdb;
User ID=Admin;Password=\'\'')...FLSA

It looks like the solution of my problem, but ...
when i send this statement to MSDE I get this error message

"OleDbException: es konnte keine Instanz des OLE DB
Providers 'Microsoft.Jet.OLEDB.4.0' erstellt werden"

translate from german
"OleDbException: Impossible to create a instance of
OLE DB Provider 'Microsoft.Jet.OLEDB.4.0'"

Is it possible to run this statement on MSDE?
if Yes - what could be the reason for the error?

Thanks in advance for your help.
Nieurig
10/27/2004 9:11:20 AM
Thanks a lot, Andrea for your great hint.
I compare your code and my code

My Code: User ID=Admin;Password=\'\'')...FLSA
Your Code: User ID=Admin;Password=')...

No quotes after "Password=" !!!

I delete them and it seems to work.
Thanks.
Andrea Montanari
10/27/2004 3:54:19 PM
hi Niels,
"Nieurig" <anonymous@discussions.microsoft.com> ha scritto nel
messaggio news:15e301c4bc27$9acbf220$a601280a@phx.gbl
[quoted text, click to view]

the syntax is quite fine,
SELECT COUNT( * ) AS [Employees #]
FROM OPENDATASOURCE(
'Microsoft.Jet.OLEDB.4.0',
'Data Source=d:\\NWIND.MDB;
User ID=Admin;Password=')...employees

returns
Employees #
-----------
9

is the OLE DB provider for JET available on your server at all?
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--------- remove DMO to reply
AddThis Social Bookmark Button