P
Paradox Synthesist
hi,
i am a newbie to asp.net and have started learning mainly from
websites. i have a question which IS very silly and trivial.
http://msdn2.microsoft.com/en-us/li...c.odbcconnectionstringbuilder.dsn(VS.80).aspx
i looked through this url to see how could i connect to a mysql
database...where does the dsn figure out? why do i need to give it? i
cant see any dsn specified anywhere on the database control panel. i
am a newbie to this thing. all i could figure out was the connection
string part:
http://dev.mysql.com/tech-resources/articles/dotnet/
.....................[
string MyConString = "DRIVER={MySQL ODBC 3.51 Driver};" +
"SERVER=localhost;" +
"DATABASE=test;" +
"UID=venu;" +
"PASSWORD=venu;" +
"OPTION=3";
OdbcConnection MyConnection = new OdbcConnection(MyConString);
MyConnection.Open();
The above one uses DSN-less connection, if you have a MyODBC DSN
defined already then you can just use "DSN=dsn_name" as the connection
string i.e.
OdbcConnection MyConnection = new OdbcConnection("DSN=myodbc3-
test");
MyConnection.Open();
]....................
but the dsn part is something that is baffling me. moreover at places
it is said that i need to change my webconfig file. is it necessary to
do so?
Could you tell me the procedure of connecting to a mysql database
using the odbc driver and inserting a row in a table; all the
procedures involved?
i am a newbie to asp.net and have started learning mainly from
websites. i have a question which IS very silly and trivial.
http://msdn2.microsoft.com/en-us/li...c.odbcconnectionstringbuilder.dsn(VS.80).aspx
i looked through this url to see how could i connect to a mysql
database...where does the dsn figure out? why do i need to give it? i
cant see any dsn specified anywhere on the database control panel. i
am a newbie to this thing. all i could figure out was the connection
string part:
http://dev.mysql.com/tech-resources/articles/dotnet/
.....................[
string MyConString = "DRIVER={MySQL ODBC 3.51 Driver};" +
"SERVER=localhost;" +
"DATABASE=test;" +
"UID=venu;" +
"PASSWORD=venu;" +
"OPTION=3";
OdbcConnection MyConnection = new OdbcConnection(MyConString);
MyConnection.Open();
The above one uses DSN-less connection, if you have a MyODBC DSN
defined already then you can just use "DSN=dsn_name" as the connection
string i.e.
OdbcConnection MyConnection = new OdbcConnection("DSN=myodbc3-
test");
MyConnection.Open();
]....................
but the dsn part is something that is baffling me. moreover at places
it is said that i need to change my webconfig file. is it necessary to
do so?
Could you tell me the procedure of connecting to a mysql database
using the odbc driver and inserting a row in a table; all the
procedures involved?