Sign in to follow this  
Followers 0
plarmuseau

sql server 2005 connection string ?

1 post in this topic

#1 ·  Posted (edited)

The data are in an inifile

i can switch from one to another.

this is ini file

[Database]
gebruik=provider2K
provider2K=SQLOLEDB
provider08=SQLNCLI10
provider05=SQLNCLI
providerXP=SQLNCLI\SQLEXPRESS
providerNC={SQL Native Client}
server=localhost
poort=1433

the sqloledb seems to work

but why does de sqlncli not work , any thoughts ?

i installed the SQL native client. i can connect the database in the configuration >system > odbc > DSN ??

i forgot something ?

$gebruik=IniRead("db.ini", "database", "gebruik", "NotFound")
$provider = IniRead("db.ini", "database", $gebruik, "NotFound")
$server = IniRead("db.ini", "database", "server", "NotFound")
$poort = IniRead("db.ini", "database", "poort", "NotFound")
$sqldb=""
$UID=""
$PWD=""
$guiw=800
$guih=300
$DB=" PROVIDER="&$provider&";SERVER="&$server&";port="&$poort&";DATABASE="&$sqldb&";UID="&$UID&";Pwd="&$PWD&";Trusted_Connection=False;Network Library=DBMSSOCN;" 
consolewrite($DB)

 $objConn = ObjCreate("ADODB.Connection")
 $objConn.Open($DB)
Edited by plarmuseau

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0