![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am just testing to see if I can establish a connection to the UltraLite database through a Pocket PC 2003 SE emulator device deployment using the Visual Studio 2005. I develop a reference to the custdb.db using the Visual Studio and SQL Anyhwere Explorer which gives me a number of canned tables: ULCustomer ULCustomerIDPool ULIdentifyEmployee_nosync ULOrder ULOrderIDPool ULProduct I drag one of these tabels to the Form1.vb code page to a button click event code: This produces the following code(auto generated) Dim UlConnection As New iAnywhere.Data.UltraLite.ULConnection(";ce_file=\P rogram Files\WinFrm\custdb.udb;nt_file=C:\Documents and Settings\All Users\Documents\SQL Anywhere 10\Samples\UltraLite.NET\CustDB\common\custdb.udb; uid=dba;pwd=sql") Dim UlCommand As New iAnywhere.Data.UltraLite.ULCommand("SELECT ""cust_id"", ""cust_name"" FROM ""ULCustomer""", UlConnection) Dim UlResultSet As iAnywhere.Data.UltraLite.ULResultSet UlConnection.Open() UlResultSet = UlCommand.ExecuteResultSet() When I build and run this I get the following error: Can't find PInvoke DLL 'ulnet10.dll'. Exception detail follows: ------------------------------------- System.MissingMethodException was unhandled Message="Can't find PInvoke DLL 'ulnet10.dll'." StackTrace: at iAnywhere.Data.UltraLite.ULDatabaseManager..ctor() at iAnywhere.Data.UltraLite.ULConnection..cctor() at TestDevice.Form1.Button1_Click() at System.Windows.Forms.Control.OnClick() at System.Windows.Forms.Button.OnClick() at System.Windows.Forms.ButtonBase.WnProc() at System.Windows.Forms.Control._InternalWnProc() at Microsoft.AGL.Forms.EVL.EnterMainLoop() at System.Windows.Forms.Application.Run() at TestDevice.Form1.Main() ------------------------------------- The first Dim statement is the offending line. The ulnet10.dll does exist on this machine at : C:\Program Files\SQL Anywhere 10\win32 It's version matches with the versions of the added references. The Added refreences to this project are: iAnywhere.Data.UltraLite type=.NET Version:10.0.0.2465 iAnywhere.Data.UltraLite.resources typr=.NET Version:10.0.0.2465 Appreciate any help. Jayaram ps: Ultralite with a windows application works fine where the DataGridViewer wizard establishes the connectivity. |
#3
| |||
| |||
|
|
Place the file in same directory as the exe generated for the application. Jayaram Krishnaswamy wrote: I am just testing to see if I can establish a connection to the UltraLite database through a Pocket PC 2003 SE emulator device deployment using the Visual Studio 2005. I develop a reference to the custdb.db using the Visual Studio and SQL Anyhwere Explorer which gives me a number of canned tables: ULCustomer ULCustomerIDPool ULIdentifyEmployee_nosync ULOrder ULOrderIDPool ULProduct I drag one of these tabels to the Form1.vb code page to a button click event code: This produces the following code(auto generated) Dim UlConnection As New iAnywhere.Data.UltraLite.ULConnection(";ce_file=\P rogram Files\WinFrm\custdb.udb;nt_file=C:\Documents and Settings\All Users\Documents\SQL Anywhere 10\Samples\UltraLite.NET\CustDB\common\custdb.udb; uid=dba;pwd=sql") Dim UlCommand As New iAnywhere.Data.UltraLite.ULCommand("SELECT ""cust_id"", ""cust_name"" FROM ""ULCustomer""", UlConnection) Dim UlResultSet As iAnywhere.Data.UltraLite.ULResultSet UlConnection.Open() UlResultSet = UlCommand.ExecuteResultSet() When I build and run this I get the following error: Can't find PInvoke DLL 'ulnet10.dll'. Exception detail follows: ------------------------------------- System.MissingMethodException was unhandled Message="Can't find PInvoke DLL 'ulnet10.dll'." StackTrace: at iAnywhere.Data.UltraLite.ULDatabaseManager..ctor() at iAnywhere.Data.UltraLite.ULConnection..cctor() at TestDevice.Form1.Button1_Click() at System.Windows.Forms.Control.OnClick() at System.Windows.Forms.Button.OnClick() at System.Windows.Forms.ButtonBase.WnProc() at System.Windows.Forms.Control._InternalWnProc() at Microsoft.AGL.Forms.EVL.EnterMainLoop() at System.Windows.Forms.Application.Run() at TestDevice.Form1.Main() ------------------------------------- The first Dim statement is the offending line. The ulnet10.dll does exist on this machine at : C:\Program Files\SQL Anywhere 10\win32 It's version matches with the versions of the added references. The Added refreences to this project are: iAnywhere.Data.UltraLite type=.NET Version:10.0.0.2465 iAnywhere.Data.UltraLite.resources typr=.NET Version:10.0.0.2465 Appreciate any help. Jayaram ps: Ultralite with a windows application works fine where the DataGridViewer wizard establishes the connectivity. |
#4
| |||
| |||
|
|
Do you mean the Project directory or the 'bin' directory? "Chris Keating (Sybase iAnywhere)" <keating_spam_free (AT) ianywhere (DOT) com> wrote in message news:46e354d4$1 (AT) forums-1-dub (DOT) .. Place the file in same directory as the exe generated for the application. Jayaram Krishnaswamy wrote: I am just testing to see if I can establish a connection to the UltraLite database through a Pocket PC 2003 SE emulator device deployment using the Visual Studio 2005. I develop a reference to the custdb.db using the Visual Studio and SQL Anyhwere Explorer which gives me a number of canned tables: ULCustomer ULCustomerIDPool ULIdentifyEmployee_nosync ULOrder ULOrderIDPool ULProduct I drag one of these tabels to the Form1.vb code page to a button click event code: This produces the following code(auto generated) Dim UlConnection As New iAnywhere.Data.UltraLite.ULConnection(";ce_file=\P rogram Files\WinFrm\custdb.udb;nt_file=C:\Documents and Settings\All Users\Documents\SQL Anywhere 10\Samples\UltraLite.NET\CustDB\common\custdb.udb; uid=dba;pwd=sql") Dim UlCommand As New iAnywhere.Data.UltraLite.ULCommand("SELECT ""cust_id"", ""cust_name"" FROM ""ULCustomer""", UlConnection) Dim UlResultSet As iAnywhere.Data.UltraLite.ULResultSet UlConnection.Open() UlResultSet = UlCommand.ExecuteResultSet() When I build and run this I get the following error: Can't find PInvoke DLL 'ulnet10.dll'. Exception detail follows: ------------------------------------- System.MissingMethodException was unhandled Message="Can't find PInvoke DLL 'ulnet10.dll'." StackTrace: at iAnywhere.Data.UltraLite.ULDatabaseManager..ctor() at iAnywhere.Data.UltraLite.ULConnection..cctor() at TestDevice.Form1.Button1_Click() at System.Windows.Forms.Control.OnClick() at System.Windows.Forms.Button.OnClick() at System.Windows.Forms.ButtonBase.WnProc() at System.Windows.Forms.Control._InternalWnProc() at Microsoft.AGL.Forms.EVL.EnterMainLoop() at System.Windows.Forms.Application.Run() at TestDevice.Form1.Main() ------------------------------------- The first Dim statement is the offending line. The ulnet10.dll does exist on this machine at : C:\Program Files\SQL Anywhere 10\win32 It's version matches with the versions of the added references. The Added refreences to this project are: iAnywhere.Data.UltraLite type=.NET Version:10.0.0.2465 iAnywhere.Data.UltraLite.resources typr=.NET Version:10.0.0.2465 Appreciate any help. Jayaram ps: Ultralite with a windows application works fine where the DataGridViewer wizard establishes the connectivity. |
![]() |
| Thread Tools | |
| Display Modes | |
| |