Mobile version ArgumentException

Mobile version ArgumentException

Postby sim » Fri 03 Jun 2011 05:53

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
sim
 
Posts: 2
Joined: Fri 03 Jun 2011 05:43

Postby Shalex » Fri 03 Jun 2011 06:35

Please run the DataReader sample in the Debug mode and post here your connection string when the error occurs.
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Fri 03 Jun 2011 07:36

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:
Code: Select all
this.pgSqlConnection.ConnectionString = "User=postgres;Host=192.168.0.200;Database=testdb;Initial Schema=test;";

Notify us if this helps.
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44

Postby sim » Fri 03 Jun 2011 08:52

It now works on my XP, but when I run it from the Windows Mobile 6.1 it gives me a "License not found" error when I click Connect.

As I mentioned, I'm using SharpDevelop (not VS) and I didn't see anywhere to add a license file.
sim
 
Posts: 2
Joined: Fri 03 Jun 2011 05:43

Postby Shalex » Tue 07 Jun 2011 13:31

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).
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Tue 07 Jun 2011 14:32

Also please make sure that your SharpDevelop is of the 3.x version:
http://wiki.sharpdevelop.net/CompactFrameworkDevelopment.ashx.
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44

Postby sandy82 » Sun 10 Jul 2011 07:52

Hello,
We have now purchased the standard version of dotConnect for PostgreSQL 5.30.172
How can I compile the lincense?
(As mentioned above the license compiler we have only works for trial version).
sandy82
 
Posts: 4
Joined: Mon 06 Jun 2011 07:24

Postby Shalex » Mon 11 Jul 2011 12:14

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.
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44

Postby sandy82 » Wed 13 Jul 2011 05:40

Hello,
I have filled out and submitted the form as requested.
Any idea when we might get the license compiler. We need it quite urgently.

Thank you
sandy82
 
Posts: 4
Joined: Mon 06 Jun 2011 07:24

Postby Shalex » Wed 13 Jul 2011 09:31

We have just sent you the license compiler for dotConnect for PostgreSQL Mobile Standard v 5.30.185. If you do not receive it, please check your spam filter and send us your alternative e-mail address.
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for PostgreSQL