Re: Connection String to Connect a VB 6 Application to SQL Server 2005



behmag@xxxxxxxxx wrote:
Hello everyone,

thank you for reading.

I have a VB 6 application that uses a connection string to connect to
a
SQL Server 2000 Database. something like this

cst = "Provider=SQLOLEDB.1;" & _
"Data Source=192.168.1.100;" & _
"Initial Catalog=databasename;" & _
"User Id=UserLoginName;" & _
"Password=UserPassword"


I use ADO, I have the lates MDAC installed. also the Microsoft SQL
Server 2005 Native Client.

My question here is : What's the equivalent Connection string to
connect my application to a SQL Server 2005 Database.

I tried :

"Provider=SQLNCLI;Server=ServerName;Database=pubs;UID=myUsername;PWD=myPassword;"


without success.


Please describe symptoms without using generic phrases like "not working" or
"without success".
Given the lack of symptom description, all we can do is guess. So, my first
guess is that you have not enabled the TCP/IP network library on your SQL
Server. See http://msdn2.microsoft.com/en-us/library/ms189083.aspx

You can still use the SQLOLEDB provider: you just won't see any of the new
functionality provided by 2005: MARS, etc. If you don't need the new
functionality, you can consider using SQLOLEDB.



--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


.



Relevant Pages

  • asp.net 2.0 login control
    ... A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.] ... These problems left me stranded for days, then today, on another machine, I hit a different set of problems I kept getting the following "Failed to generate user instance of SQL Server due to a failure in starting the process for the user instance. ... (Basically this is a new option in the connection string that allows you to point out where the ..mdf file resides eliminating the need to create database in some SQL instance.) ... Beware that the windows account of the user that first creates the connection in this databaseless manner, becomes exclusive user for this file and no other windows account will be able to create a connection to this file. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Newbie question on SQL connection
    ... database on my developer machine. ... > to develop databases away from the live SQL server - that way in the ... > domain SQL Server. ... Does your connection string contain a typo? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: .NET and SQL Server on Separate Machines
    ... add this domain account as a valid login to your sql server. ... Everything was running correctly when the database ... > The connection string in our web.config file originally looked like this: ...
    (microsoft.public.sqlserver.connect)
  • Re: .NET and SQL Server on Separate Machines
    ... add this domain account as a valid login to your sql server. ... Everything was running correctly when the database ... > The connection string in our web.config file originally looked like this: ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: MS Access DAO -> ADO.NET Migration
    ... William Vaughn ... Microsoft MVP ... Hitchhiker's Guide to Visual Studio and SQL Server ... My migration app works building a SSCE database file with imported data ...
    (microsoft.public.dotnet.framework.adonet)