Answered by:
keyword not supported error

Question
-
User-763776826 posted
when i connect my asp.net application with the mysql 5.1 then an error occur:---in connection string:-ArgumentException was Unhandled by user code keyword not supported .parameter name :dsn.............plz can anybody tell me the solution of it:
Thanks in advance
manisha walia
Wednesday, August 3, 2011 3:40 AM
Answers
-
User500621135 posted
Connection string
Local database
Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;Remote database
Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;Specifying TCP/IP port
Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Port=3306;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;The driver defaults to port value 3306, if not specified in the connection string, as 3306 is the default port for MySQL.Specifying character set
Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;charset=UTF8;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;Specifying socket
This one specifies the Unix socket file or Windows named pipe to connect to. Used only for local client connections.Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername;Password=myPassword;Socket=MySQL;Option=3;On Windows, the socket variable is the name of the named pipe that is used for local client connections. The default value is MySQL.
On Unix platforms, the socket variable is the name of the socket file that is used for local client connections. The default is /tmp/mysql.sock.Using SSL
Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername;Password=myPassword;sslca=c:\cacert.pem;sslcert=c:\client-cert.pem;sslkey=c:\client-key.pem;sslverify=1;Option=3;SSLCA specifies the path to a file with a list of trust SSL CAsI hope this help ........... If you face more problem then email me kamalchhabra1@hotmail.comsee also this link- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, August 3, 2011 3:51 AM -
User500621135 posted
you have to be use
using system.data.odbc;
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, August 4, 2011 3:28 AM -
User500621135 posted
Administrative Tools --> Data Sources (ODBC) --> Create a connection
In Visual Studio --> Open your server browser and then create a new connection.
Select the connection type as Microsoft ODBC Data Source (ODBC)
Select the radio button for Using Connection String, Select Machine Data Source and
the select your data source you just created.
You can just copy this string and paste it in to your web/app.config file.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, August 4, 2011 8:19 AM
All replies
-
User1642208711 posted
Check here for different types of connectionstrings for MySql in .Net. http://www.connectionstrings.com/mysql
The error shows that there shouldn't be a attribute named dns in the connection string. Try to remove the attribute dns from connection string if any. And follow any one of the connection strings provided in above link.
Wednesday, August 3, 2011 3:47 AM -
User500621135 posted
Connection string
Local database
Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;Remote database
Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;Specifying TCP/IP port
Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Port=3306;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;The driver defaults to port value 3306, if not specified in the connection string, as 3306 is the default port for MySQL.Specifying character set
Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;charset=UTF8;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;Specifying socket
This one specifies the Unix socket file or Windows named pipe to connect to. Used only for local client connections.Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername;Password=myPassword;Socket=MySQL;Option=3;On Windows, the socket variable is the name of the named pipe that is used for local client connections. The default value is MySQL.
On Unix platforms, the socket variable is the name of the socket file that is used for local client connections. The default is /tmp/mysql.sock.Using SSL
Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername;Password=myPassword;sslca=c:\cacert.pem;sslcert=c:\client-cert.pem;sslkey=c:\client-key.pem;sslverify=1;Option=3;SSLCA specifies the path to a file with a list of trust SSL CAsI hope this help ........... If you face more problem then email me kamalchhabra1@hotmail.comsee also this link- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, August 3, 2011 3:51 AM -
User-763776826 posted
not working....another error occur which is:-
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ...plz tell me how to solve it...........
thanks
Thursday, August 4, 2011 1:05 AM -
User500621135 posted
you have to be use
using system.data.odbc;
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, August 4, 2011 3:28 AM -
User-763776826 posted
i have already use it.
Thursday, August 4, 2011 4:35 AM -
User500621135 posted
if there create problem you have to be add as a aweb refrence (data.odbc)
Thursday, August 4, 2011 5:29 AM -
User-763776826 posted
How can i make Dll from a class in c#....plz explain the steps .....
Thanks & regards:-
Manisha Walia
Thursday, August 4, 2011 8:01 AM -
User500621135 posted
Administrative Tools --> Data Sources (ODBC) --> Create a connection
In Visual Studio --> Open your server browser and then create a new connection.
Select the connection type as Microsoft ODBC Data Source (ODBC)
Select the radio button for Using Connection String, Select Machine Data Source and
the select your data source you just created.
You can just copy this string and paste it in to your web/app.config file.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, August 4, 2011 8:19 AM -
User-763776826 posted
have done it .... but not working....but i have done it without odbc ...pls tell me how to make dll of my class....Thanks
Thursday, August 4, 2011 8:22 AM -
User500621135 posted
dear
the way that i tell you it's a way
this time you do with odbc
try
if this not worked then u have be show your code
then, i can do someting for u?
Thursday, August 4, 2011 8:37 AM -
User500621135 posted
dear
the way that i tell you it's a way
this time you do with odbc
try
if this not worked then u have be show your code
then, i can do someting for u?
Thursday, August 4, 2011 8:37 AM -
User500621135 posted
see this link i hope this link also helps
Thursday, August 4, 2011 8:42 AM -
User-763776826 posted
pls tell me how i can covert my class into dll.
Friday, August 5, 2011 12:42 AM -
User500621135 posted
yaaar kyu maze le rahe ho....... iska solution yahi hai......
i think you wanna make my fun
if not then re-install all software under a perfectionalist
Friday, August 5, 2011 1:00 AM -
User500621135 posted
see below link
http://forums.asp.net/t/1215601.aspx/1
http://www.evdenevenakliyatbul.com
new Projects >> class library >> add reference >> add reference >>>>>>>>>>>>> using System.Data.SqlClient; using System.Web; Projects run C:\Documents and Settings\Senol\Belgelerim\Visual Studio 2005\Projects\free\free\bin\Debug\free.dll
Friday, August 5, 2011 1:14 AM -
User500621135 posted
See tis link then This Helps
Do It now
Friday, August 5, 2011 1:16 AM