SSL - connection is working - not working

SSL - connection is working - not working

Postby Zero-G. » Wed 09 Jul 2008 11:55


I use VB.NET 2008 and your latest components v4.70.30

I have a created a SSL Connection through the Database-Explorer. - When I connect there, everything works fine. - Then, I have created a Connection on a WinForm and a DataSet. - The connection of the DataSet belongs to the connection, created from the Database-Explorer.
The problem is: I can connect to the DataBase through the Connection Property on the Winform, but when I try to run a Select Statement, the access is denied.

Please take a look:

The Stacktrace is as follows:

System.InvalidOperationException wurde nicht behandelt.
Message="Fehler beim Erstellen des Formulars. Weitere Informationen finden Sie in Exception.InnerException. Fehler: SELECT command denied to user 'bacik001'@'' for table 'termin'."
bei VOPT.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:Zeile 190.
bei VOPT.My.MyProject.MyForms.get_frmHauptmenue()
bei VOPT.My.MyApplication.OnCreateMainForm() in C:\Users\Intelli Soft\Desktop\VS2005\Vopt\VOPT\My Project\Application.Designer.vb:Zeile 35.
bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
bei VOPT.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:Zeile 81.
bei System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()
InnerException: CoreLab.MySql.MySqlException
Message="SELECT command denied to user 'bacik001'@'' for table 'termin'"
bei CoreLab.MySql.a9.n()
bei CoreLab.MySql.a9.c()
bei CoreLab.MySql.b.a(e[]& A_0, Int32& A_1)
bei CoreLab.MySql.b.a(Byte[] A_0, Int32 A_1, Boolean A_2)
bei CoreLab.MySql.z.e()
bei CoreLab.MySql.z.o()
bei CoreLab.MySql.MySqlCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3)
bei CoreLab.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
bei System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
bei System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
bei System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
bei System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
bei VOPT.usrTermin..ctor() in C:\Users\Intelli Soft\Desktop\VS2005\Vopt\VOPT\UserControl\Termin\usrTermin.vb:Zeile 11.
bei VOPT.frmHauptmenue..ctor() in C:\Users\Intelli Soft\Desktop\VS2005\Vopt\VOPT\Formulare\frmHauptmenü.vb:Zeile 43.

What can the problem be?


So, I tried to do a little workaround. - I have made a little Class, where I set the connectionstring to the DataAdapter before I fill it. - Now I get the error: "Lost Connection during query"

Is there any help?
Posts: 390
Joined: Sat 09 Dec 2006 12:20

Postby Zero-G. » Wed 09 Jul 2008 15:00


I found out, what the problem was - but this brings me to another problem...
So, the problem was, that in my DataAdapters I use TableDirect method. - So, there was the wrong table. - So I changed it to the right. - Now it works.
BUT - How can I change this things by code? - Each of the user from my program has to get the data of "his" table.
In the connectionstring, I use the Database = "bacik", but when in the DataAdapters TableDirect stands: 'voptneu'.'termin' - Then it trys to connect to Database 'voptneu' but it should connect to 'bacik'

How to change this behaivour?

Posts: 390
Joined: Sat 09 Dec 2006 12:20

Postby AndreyR » Tue 15 Jul 2008 10:39

Hello, Zero-G.

Try to execute SQL command "use database `bacik`" and then work with the necessary table.

Regards, Andrey.
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Return to dotConnect for MySQL