Error with ExecuteTable

Discussion in 'Questions (Windows Mobile)' started by N1c0_ds, Oct 21, 2008.

  1. N1c0_ds

    N1c0_ds Active Member Licensed User

    This is my app_start sub, I grayed out the rest of the code from where the error happens:

    Code:
    SQLRead.New1
    SQLConn.New1
    SQLCmd.New1(
    "",SQLConn.Value)
    SQLConn.Open(
    "Data Source = " & AppPath & "\database.gdb")
    SQLCmd.CommandText=
    "select * from Name"
    [COLOR=
    "Red"]SQLCmd.ExecuteTable("tblMain",0)[/COLOR]
    [COLOR=
    "Silver"]FormLib.New1("FrmMain",B4PObject(1))
    FormLib.MinimizeBox=
    false
    Registry.New1
    Registry.RootKey(registry.rtCurrentUser)
    Hardware.New1
    Contextsearch.New1
    Contextsearch.AddItem(
    "Copy")
    Contextsearch.AddItem(
    "Paste")
    FormLib.AddContextMenu(
    "txtSearch",Contextsearch.Value)
    frmMain.ForeLayer=
    True
    FrmMain.Show
    FrmMain.Focus
    Hardware.SIPEnabled=
    False
    GetSettings 
    'The last thing to be done. If it crashes, it will exit the sub![/COLOR]
    It says it's unable to execute a cast on object type "System.data.sqlite.sqliteconnection" to "System.Windows.Forms.Control" or something like this (roughly translated from french).

    TblList is a table, database.gdb is a SQL DB created from a CSV and Main is a DB in database.gdb

    What did I do wrong?
     
  2. N1c0_ds

    N1c0_ds Active Member Licensed User

    Nevermind, fixed. I tried it with the Northwind DB and it worked fine.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice