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



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.


Thank you in advance,

Behring

PS.
I have not tried any ODBC connection because i would like to use this
way. (OLEDB)
I'm using SQL Server 2005 not SQL Server 2005 Express.

.



Relevant Pages

  • Re: Access and processor usage
    ... "increased bandwidth" using ADO. ... bottleneck - need to step up to Sql Server. ... If the data fits into a 2 GB database file, ...
    (comp.databases.ms-access)
  • Re: How to access the SQL server express from mfc application?
    ... There are different ways to do this via MFC. ... You could certainly try ADO, ... the entire contents of the database to a SQL Server Standard Server. ...
    (microsoft.public.vc.mfc)
  • 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: DSN Behaving Badly
    ... With ADO, you can have either a global connection string, global command ... your application which use data from the sql server. ... With ADO, you would still have tbl1, but it would be a local table (for ...
    (comp.databases.ms-access)
  • Re: Connecting to a SQL Server 2005 using VBA and ADO
    ... dao should work just fine.... ... the above example when using sql server, or a plan Jane un-split database, ... I would not use findfirst even when not using sql server unless the data set ... Microsoft since they now seem to be favoring ADO. ...
    (microsoft.public.access.formscoding)

Quantcast