Mobile version ArgumentException
Mobile version ArgumentException
dotConnect for PostgreSQL 5.30 Mobile Trial
I compiled the DataReader sample using SharpDevelop. The application opened and when I changed the user name, I got the following error. This also happened when I changed the schema name. It allowed me to change the host without a problem.
I also could not find where the default arguments are stored.
System.ArgumentException: Connection parameter 'user id' is duplicated.
at Devart.Common.DbConnectionOptions.ParseConnectionString(Hashtable synonyms)
at Devart.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useFirstKeyValuePair)
at Devart.Data.PostgreSql.PgSqlConnectionOptions..ctor(String connectionString)
at Devart.Data.PostgreSql.z.m(String A_0, DbConnectionOptions A_1)
at Devart.Common.DbConnectionFactory.h(String A_0, DbConnectionOptions& A_1)
at Devart.Common.DbConnectionBase.set_ConnectionString(String value)
at Devart.Data.PostgreSql.PgSqlConnection.set_ConnectionString(String value)
at Devart.Data.PostgreSql.PgSqlConnection.aj(String A_0, Object A_1)
at Devart.Data.PostgreSql.PgSqlConnection.set_UserId(String value)
at Devart.Data.PostgreSql.ConnectForm.btConnect_Click(Object sender, EventArgs e) in c:\Program Files\Devart\dotConnect Mobile\PostgreSQL\Samples\Common\CS\ConnectForm.cs:line 201
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.
IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.RunDialog(Form form)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at DataReader.MainForm.miConnect_Click(Object sender, EventArgs e) in c:\Program Files\Devart\dotConnect Mobile\PostgreSQL\Samples\DataReader\CS\MainForm.cs:line 239
at DataReader.MainForm.MainForm_Load(Object sender, EventArgs e) in c:\Program Files\Devart\dotConnect Mobile\PostgreSQL\Samples\DataReader\CS\MainForm.cs:line 175
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at DataReader.MainForm.Main() in c:\Program Files\Devart\dotConnect Mobile\PostgreSQL\Samples\DataReader\CS\MainForm.cs:line 170
I compiled the DataReader sample using SharpDevelop. The application opened and when I changed the user name, I got the following error. This also happened when I changed the schema name. It allowed me to change the host without a problem.
I also could not find where the default arguments are stored.
System.ArgumentException: Connection parameter 'user id' is duplicated.
at Devart.Common.DbConnectionOptions.ParseConnectionString(Hashtable synonyms)
at Devart.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useFirstKeyValuePair)
at Devart.Data.PostgreSql.PgSqlConnectionOptions..ctor(String connectionString)
at Devart.Data.PostgreSql.z.m(String A_0, DbConnectionOptions A_1)
at Devart.Common.DbConnectionFactory.h(String A_0, DbConnectionOptions& A_1)
at Devart.Common.DbConnectionBase.set_ConnectionString(String value)
at Devart.Data.PostgreSql.PgSqlConnection.set_ConnectionString(String value)
at Devart.Data.PostgreSql.PgSqlConnection.aj(String A_0, Object A_1)
at Devart.Data.PostgreSql.PgSqlConnection.set_UserId(String value)
at Devart.Data.PostgreSql.ConnectForm.btConnect_Click(Object sender, EventArgs e) in c:\Program Files\Devart\dotConnect Mobile\PostgreSQL\Samples\Common\CS\ConnectForm.cs:line 201
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.
IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.RunDialog(Form form)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at DataReader.MainForm.miConnect_Click(Object sender, EventArgs e) in c:\Program Files\Devart\dotConnect Mobile\PostgreSQL\Samples\DataReader\CS\MainForm.cs:line 239
at DataReader.MainForm.MainForm_Load(Object sender, EventArgs e) in c:\Program Files\Devart\dotConnect Mobile\PostgreSQL\Samples\DataReader\CS\MainForm.cs:line 175
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at DataReader.MainForm.Main() in c:\Program Files\Devart\dotConnect Mobile\PostgreSQL\Samples\DataReader\CS\MainForm.cs:line 170
We have reproduced the problem. We will correct the sample. As a workaround, please open the MainForm.cs file (View Code) and comment (or remove) the following line of code:
Notify us if this helps.
Code: Select all
this.pgSqlConnection.ConnectionString = "User=postgres;Host=192.168.0.200;Database=testdb;Initial Schema=test;";
There is no SharpDevelop in the list of IDEs which are supported by dotConnect for PostgreSql (compatibility page).
So our provider is not integrated in this IDE, and the license resource is not compiled automatically. But you can build
the license resource manually using our license compiler (we have sent it to the e-mail from your profile). Be aware that
this license compiler can be used only with a paticular version of dotConnect for PostgreSQL Mobile. The one we
have sent to you can be used only with dotConnect for PostgreSQL Mobile Trial v 5.30.165.
Instructions how to use the license compiler:
1) run this command (replace MyApp.exe with the name of your application)
CrLc.exe /target:MyApp.exe
The output file is Devart.Data.PostgreSql.licenses . Now it can be used only with a particular assembly (MyApp.exe in our sample).
2) put Devart.Data.PostgreSql.licenses to the root folder of your project, add it to the project via SharpDevelop, and set
its "Build action" property to EmbeddedResource. Rebuild your project. Now MyApp.exe can be deployed on your mobile device (with Devart.Data.PostgreSql.dll).
So our provider is not integrated in this IDE, and the license resource is not compiled automatically. But you can build
the license resource manually using our license compiler (we have sent it to the e-mail from your profile). Be aware that
this license compiler can be used only with a paticular version of dotConnect for PostgreSQL Mobile. The one we
have sent to you can be used only with dotConnect for PostgreSQL Mobile Trial v 5.30.165.
Instructions how to use the license compiler:
1) run this command (replace MyApp.exe with the name of your application)
CrLc.exe /target:MyApp.exe
The output file is Devart.Data.PostgreSql.licenses . Now it can be used only with a particular assembly (MyApp.exe in our sample).
2) put Devart.Data.PostgreSql.licenses to the root folder of your project, add it to the project via SharpDevelop, and set
its "Build action" property to EmbeddedResource. Rebuild your project. Now MyApp.exe can be deployed on your mobile device (with Devart.Data.PostgreSql.dll).
Also please make sure that your SharpDevelop is of the 3.x version:
http://wiki.sharpdevelop.net/CompactFra ... pment.ashx.
http://wiki.sharpdevelop.net/CompactFra ... pment.ashx.
Please contact us via this form and specify:
1) the e-mail you have used during registration;
2) the latest version of dotConnect for PostgreSQL Mobile is 5.30.185. Do you need exactly 5.30.172?
We will send you the license compiler for the licensed version of dotConnect for PostgreSQL Mobile (this compiler also can be used only with a particular version of our provider) by e-mail.
1) the e-mail you have used during registration;
2) the latest version of dotConnect for PostgreSQL Mobile is 5.30.185. Do you need exactly 5.30.172?
We will send you the license compiler for the licensed version of dotConnect for PostgreSQL Mobile (this compiler also can be used only with a particular version of our provider) by e-mail.