About database connection, again
The Weird and The Wonderful
1
Posts
1
Posters
0
Views
1
Watching
-
I guess there are many samples of connection strings here (with asterisks instead of password, etc.). Here is another one
string connectionString = String.Format("Sever={0};Dsn={1}", server, databaseName); OdbcConnection connection = new OdbcConnection(connectionString); try { connection.Open(); } catch (Exception) { return false; }
1. I think ODBC driver has absolutely no idea what is "Sever" (and if it does, perhaps it would like more to go to the "Yuh". A joke for those who speaks Russian). 2. If it's spelling mistake (author wants ODBC driver as his English teacher), DSN already contains information about server. 3. What about user name and password? 4. DSN is data source name actually.