OpenDataSource connection problem

J

JensB

Hi


I try to load some customer data from XXXSERVER which is placed on a SQL2000
server (Windows Server 2003) machine to an vb.net application/Access
database on a client machine(XP), with following SQL and connection string:

AccessConn = New System.Data.OleDb.OleDbConnection("Provider=SQLOLEDB;Data
Source=XXXSERVER;Integrated Security=SSPI;Initial Catalog=XXXdata")

strSQL = "INSERT INTO OpenDataSource('Microsoft.Jet.OLEDB.4.0','Data
Source=C:\xxxDB.mdb;User ID=Admin;Password=;')...Company (" & CompanyStr &
") " & _
"SELECT " & CompanyStr & " From dbo_XCOMP_tblCompany ;"

I get an errror saying "C:\xxxDB.mdb" does not exist, which is does.
Then I found out, that placing a copy of database "C:\xxxDB.mdb" on the 2003
Server,
it works perfect. I also tried to use an UNC "\\ClientMachine:\xxxDB.mdb",
but that gave me this error:
"Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned
0x80004005: ]"
How do I make the Access part of the SQL think it is on the client machine?

JensB
 
D

david

You can't make the Access part of the SQL think that
Access is on the client machine. It doesn't work that
way.

You have to work out why Access (sql server, jet)
can't open \\ClientMachine:\xxxDB.mdb. That example
won't work because it is wrong, hopefully you didn't
make that mistake, so have you tested that share?

Or you can create a mapped drive on the server that
maps to the client machine where mdb is stored.

Or you can move the mdb to the server.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top