E
EricW
Hi,
I have the following line in my code:
strConnect = String.Format("Data Source={0},{1};Network
Library=DBMSSOCN;Initial Catalog={2};Integrated Security=False;Trusted
Connection=Yes;UID={3};PSW={4};", myServer, myDBPort, Database.Name,
myDBUsername, myDBPassword)
with: myServer = "1.2.3.4"
myDBPort = "1344"
Database.Name = "test"
myDBUsername = "test1"
myDBPassword = "test2"
the strConnect should look like:
"Data Source=1.2.3.4,1344;Network Library=DBMSSOCN;Initial
Catalog=test;Integrated Security=False;Trusted
Connection=Yes;UID=test1;PSW=test2"
But.... it looks like this: "Data Source=1.2.3.4
No ending " and no rest of the string.
If I take out the variables and just hardcode the info, there is no problem.
Why is the string not ending with " after the IP address?
The same happens if I hard-code the IP. Then there is no ending " after the
portnumber.
Can someone help me with this? I'm stuck now...
rg,
Eric
I have the following line in my code:
strConnect = String.Format("Data Source={0},{1};Network
Library=DBMSSOCN;Initial Catalog={2};Integrated Security=False;Trusted
Connection=Yes;UID={3};PSW={4};", myServer, myDBPort, Database.Name,
myDBUsername, myDBPassword)
with: myServer = "1.2.3.4"
myDBPort = "1344"
Database.Name = "test"
myDBUsername = "test1"
myDBPassword = "test2"
the strConnect should look like:
"Data Source=1.2.3.4,1344;Network Library=DBMSSOCN;Initial
Catalog=test;Integrated Security=False;Trusted
Connection=Yes;UID=test1;PSW=test2"
But.... it looks like this: "Data Source=1.2.3.4
No ending " and no rest of the string.
If I take out the variables and just hardcode the info, there is no problem.
Why is the string not ending with " after the IP address?
The same happens if I hard-code the IP. Then there is no ending " after the
portnumber.
Can someone help me with this? I'm stuck now...
rg,
Eric