Database connection without DSN
-
how can i connect in to a database without specifying the DSN name in the connection string ?, i heard some string with the combination of SERVER ; DATABASE and DRIVER can do that ! i tried but i couldnt.. any idea? thanks in advance Situation : my program uses SQL server as database( local / remote ). user can add multiple companies( each company creates as seperate database), and i connects them via DSN , the problem is the DSN is creating in local machine. but the company details keeps in remote machine, any user connects to the remote machine can view the companies but he couldnot connect to that bcz the DSN resides in local machine from where the company was creted. if there is any machanism to represent the DSN detailes in remote machine ( Table entries), i can connect into companies by using those info without depending the local DSN Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.
-
how can i connect in to a database without specifying the DSN name in the connection string ?, i heard some string with the combination of SERVER ; DATABASE and DRIVER can do that ! i tried but i couldnt.. any idea? thanks in advance Situation : my program uses SQL server as database( local / remote ). user can add multiple companies( each company creates as seperate database), and i connects them via DSN , the problem is the DSN is creating in local machine. but the company details keeps in remote machine, any user connects to the remote machine can view the companies but he couldnot connect to that bcz the DSN resides in local machine from where the company was creted. if there is any machanism to represent the DSN detailes in remote machine ( Table entries), i can connect into companies by using those info without depending the local DSN Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.
string connectionString = "DRIVER={SQL Server};SERVER=ServerName;DATABASE=DatabaseName;UID=User; PWD=Password";
Jeff Martin My Blog -
string connectionString = "DRIVER={SQL Server};SERVER=ServerName;DATABASE=DatabaseName;UID=User; PWD=Password";
Jeff Martin My Blogyes i tried this , but the problem is the database is not changing..:( always i gets the database which one i connects first.. Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.
-
yes i tried this , but the problem is the database is not changing..:( always i gets the database which one i connects first.. Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.
I'd have to see some code and this is not the correct forum for a discussion of database issues, this is for article ideas. Jeff Martin My Blog