Page 1 of 1

Connection Error when Upgrading (v2016)

Posted: Wed Apr 05, 2017 11:37 pm
by Usman Khan

I'm upgrading project made with asp.net 8 with asp.net maker 2016 using same mysql odbc connection settings
project works fine when i generate code with asp.net 8, but when I open project with 2016 version and generate code
it gives following error when i browse site

An unhandled exception has occurred: Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Keyword not supported.
Parameter name: dsn
at MySql.Data.MySqlClient.MySqlConnectionStringBuilder.GetOption(String key)
at MySql.Data.MySqlClient.MySqlConnectionStringBuilder.set_Item(String keyword, Object value)
at System.Data.Common.DbConnectionStringBuilder.set_ConnectionString(String value)
at MySql.Data.MySqlClient.MySqlConnectionStringBuilder..ctor(String connStr)
at MySql.Data.MySqlClient.MySqlConnection.set_ConnectionString(String value)
--- End of inner exception stack trace ---


MySQL ODBC support (v2016)

Posted: Thu Apr 06, 2017 8:08 pm
by Usman Khan

Does ASP.NEt Maker 2016 support mysql ODBC for connection?


Re: Connection Error when Upgrading to Asp.net maker 2016

Posted: Fri Apr 07, 2017 9:33 am
by motfs

Do you use Direct Connection for MySQL? You may output the connection string to verify. Read Server Events and Client Scripts -> Database_Connecting (Example 1) in help file for more detail.


Re: Does ASP.NEt Maker 2016 support mysql ODBC for connectio

Posted: Fri Apr 07, 2017 9:43 am
by motfs

Use Connector/Net included in the template, not ODBC.

It should be fine to connect to MySQL database. Read Database Setup -> 3. MySQL in help file for more detail.