authentication problems when using sp_addlinkedserver in VB.NET

  • Thread starter Thread starter Eddie Suey
  • Start date Start date
E

Eddie Suey

I want to write a fixed-width txt file using the Jet 4.0 Driver and
SQLServer. The approach I've taken is to:
- create a linked server (called txtsrv) using the stored procedure
*sp_addlinkedserver*
- create a login using the stored procedure *sp_addlinkedsrvlogin*
- create a connection to txtsrv. In the connection string I pass the Data
Source=****, Provider=SQLOLEDB;,User Id=****, and password=****. The
connection seems to be created with no problem. Also, I verify that
txtsrv exist using the SQLServer Query Analyzer. It does, and it has
tables, however, no schema or catalogs are listed in Query Analyzer output.
- finally, after getting a connection I try to run a simple SELECT
statement - just to see if everything is working - and I get the following
error:
<ERROR>
"OLE DB Provider 'Microsoft.Jet.OLEDB.4.0' reported an error. Authentication
failed.....The workgroup information file is missing or opened exclusively
by another user."
</ERROR>
The code will run if I bypass the txtsrv process and write directly to the
file via the Jet 4.0 Driver - but it is really slow and I was hoping that
using SQLServer to create a linked server would speed up the process.
 
Back
Top