Hi,
I'm having a problem connecting to a SQL Server 2k (SP3) db using oledb
provider in a VBS. Running on a Win2k server. This is what happens.
If I use a localhost sql server, and have in my connection string
data source=(local)
I can connect to the database. But when I'm using a server
installation, and use a connectionstring in the form:
data source=server\db
I all of a sudden get an error: "error connecting to data source"
So it looks like it makes a difference where the sql server is
installed: on a laptop/desktop it works fine, on a server, in a more
complex setting, it stops working.
I tried a lot of things already (like Trusted_Connection, different
username/pwd combinations, different ways of putting the server name in
the connection string), but nothing solved the problem so far. And the
project deadline is... well too soon. ;-)
Thanks for your help/suggestions.
Regards,
StefCreate a udl file and build the connection string .
Here's how;
create a text file called sample.txt on your desktop.
Rename sample.txt to sample.udl.
Doubleclick sample.udl and select the Provider for SQL and Test the
connection.
Then right click on the graphic and open it as text. It will appear like
this;
Provider=SQLOLEDB.1;Persist Security Info=False;User ID=UserNameHere
;Initial Catalog=Northwind;Data Source=SQLServerNameHere,1433;Network
Library=DBMSSOCN;Packet Size=2048;Use Encryption for Data=False
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
Monday, March 12, 2012
OLEDB connection error
Labels:
connecting,
connection,
database,
error,
microsoft,
mysql,
oledb,
oledbprovider,
oracle,
running,
server,
sp3,
sql,
vbs,
win2k
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment