Hi all,

Can anybody help me out with the connectionstring for connecting VB6 to a Microsoft SQL Server 2005 Express Edition. I have tried several documented varieties which do not work.
My latest attempt was a version from this website.
I downloaded the application and associated files and changed the server name in the connection string to LAPTOP (which is the name of my server)but when ran I keep getting error message

Run-time error'-2147467259(80004005)

An attempt to attach an auto-named database for file C:\Doc.......\northwind.mdf failed.A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

This problem is driving me insane as the error messages are almost as baffling as connection strings and sqlserver put together!!!!:confused:

Recommended Answers

All 2 Replies

I had tried this site already.However,after the advice from a colleague at work and yourself I took a second look.

The suggested..

Driver={SQL Native Client};Server=myServerName\theInstanceName;Database=myDataBase; Trusted_Connection=yes;

didn't work. I then replaced

Driver

with

Provider

and Hey Presto...!!
Ya little booty.
Cheers for the reply.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.