MS SQL Server 2005 Express & VB6

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Jan 2008
Posts: 50
Reputation: lostandfound is an unknown quantity at this point 
Solved Threads: 1
lostandfound's Avatar
lostandfound lostandfound is offline Offline
Junior Poster in Training

MS SQL Server 2005 Express & VB6

 
0
  #1
Nov 5th, 2008
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

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Run-time error'-2147467259(80004005)
  2.  
  3. 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!!!!
Ther are 10 types of people in the world. Those who do understand binary and those who don't!!
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 45
Reputation: AUGXIS is an unknown quantity at this point 
Solved Threads: 11
AUGXIS's Avatar
AUGXIS AUGXIS is offline Offline
Light Poster

Re: MS SQL Server 2005 Express & VB6

 
0
  #2
Nov 6th, 2008
have you tried this one http://www.connectionstrings.com/
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 50
Reputation: lostandfound is an unknown quantity at this point 
Solved Threads: 1
lostandfound's Avatar
lostandfound lostandfound is offline Offline
Junior Poster in Training

Re: MS SQL Server 2005 Express & VB6

 
0
  #3
Nov 6th, 2008
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.
Last edited by lostandfound; Nov 6th, 2008 at 3:26 pm. Reason: spelling
Ther are 10 types of people in the world. Those who do understand binary and those who don't!!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the Visual Basic 4 / 5 / 6 Forum


Views: 1580 | Replies: 2
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC