Wrox Programmer Forums
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 4th, 2006, 05:30 PM
Registered User
 
Join Date: Oct 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to raktol
Default sqlserverexpress

Just a quick one...

I have looked and looked etc but...no definitive result.

I maintain a legacy database app written in VB6 using SQL7. Now I now that the app works using sql2000. With SQLserverxpress (which would easily serve our needs) using the same connection string the response is "sql server could not be found"...

I have read that sqlexpress should be happy using a legacy connection string etc ie provider=SQLOLEDB.1. But is doesnt..

(1) is this because of the way that I have installed SQLExpress.
(2) SQLOLEDB no longer works..

I have used the native client and that works to a certain degree, however, the app uses a custom dll file with hardwired connectons strings that use sqloledb.

most of the app works but some parts dont because of the referenced dll....
Ideally I would like to keep using the original connecton string..

So far I have not seen anything definitive..ie. it wont work use the native provider...

this is the connection string that works with anything prior to sqlexpress

    MyConnString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=" & User & ";Password=" & strPassword & ";Initial Catalog=" _
        & DBName & ";Data Source=" & ServerName & ";Connect Timeout=50"


So question is..is it a server config problem, or a case of changing the connection string and subsequent code

cheers


 
Old October 5th, 2006, 03:49 PM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

raktol, we have been sucessful using the following connection string format:

Server=servername;uid=username;PWD=password;Databa se=database;

Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html
 
Old October 8th, 2006, 05:31 AM
Registered User
 
Join Date: Oct 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to raktol
Default

HI SQLScott,

Cheers for the prompt reply..

I noticed your connection string doesnt specify the data provider.

have you configured a DSN for sql2005?

Sorry if this is a dumb question

regards



 
Old October 8th, 2006, 12:11 PM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Hi, yes, this is for sql server 2005. You can also use this one:

Data Provider=SQLNCLI;Server=servername;uid=username;PW D=password;Database=database;

Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html





Similar Threads
Thread Thread Starter Forum Replies Last Post
SQLServerExpress not allow remote connection VictorVictor ASP.NET 2.0 Professional 21 October 24th, 2006 03:15 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.