Listview help

Discussion in 'Questions (Windows Mobile)' started by jeterry, Apr 16, 2008.

  1. jeterry

    jeterry Member Licensed User

    Filippo, First of all thank you for your listview libraries.

    I was looking at using the libraries for a project I had started and I was checking out the listview program on the device, which by the way is a Intermec 751c, with pocket pc version 4.20.

    I tried to run a complied listview example on the device and got the below error.

    Error Message on device.
    Listview.exe
    ArgumentException

    at System.PInvoke.EE.Runtime_InteropServices_GCHandle_InternalGet()
    at System.WeakReference.get_IsAlive()
    at System.Data.SQLite.SQLiteConnection.ClearReferences()
    at System.Data.SQLite.SQLiteConnection.RemoveCommand()
    at System.Data.SQLite.SQLiteCommand.set_Connection()
    at System.Data.SQLite.SQLiteCommand.Dispose()
    at System.Data.SQLite.SQLiteCommand.Finalize()

    The occurs after you have selected the table and then click the loadSql menu item. I also tried running the program under the device ide and the program runs fine. Device ide says running net version 2.0.7045

    Items loaded on the device.

    Listview.exe
    ListViewSQLDevice.dll
    Northwind.sl3
    System.Data.SQLite.DLL

    So could you take a look and see what is going on and tell me what I am doing wrong.

    Thanks again
     
  2. Filippo

    Filippo Expert Licensed User

    Hello jeterry,

    can you upload your code, please?
    With the code I could help you better.

    Do I understand it right? At the device it runs fine and at the desktop ide it doesn't run?


    Ciao,
    Filippo
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Are you opening and closing the SQL connection several times (which is not required) ?
     
  4. jeterry

    jeterry Member Licensed User

    Listview

    Filippo,

    I am just using your example code that you had for the listviewsql.zip I have attached what I downloaded, along with the complied example.

    What I did was complied the your example and then transfered all the items to the device and tried to run it, that's when I received the error message.

    As I said it runs fine from the desktop IDE and the device IDE. The complied example, starts up and displays form1, you select the table and then click loadsql. That is were you get the error message as in my orginal post.

    Thanks
     
  5. Filippo

    Filippo Expert Licensed User

    I have the example compiled new without "optimized compilation", and now it works.
    Why it doesn't work with "optimized compilation" I don't know.:confused:
     
  6. jeterry

    jeterry Member Licensed User

    Filippo,

    Thanks for find the problem. I compiled it in the non-optimized mode and it now works on the device.

    If you find a fix, please advise. I would really like to use it because it has some neat features.

    Thanks again for looking at the problem.
     
Loading...