SQLite

Discussion in 'Questions (Windows Mobile)' started by magi6162, Jun 10, 2008.

  1. magi6162

    magi6162 Well-Known Member Licensed User

    If optimize compiler I got error when run the program:
    Impossible cast of objects of type System.DBNull on type
    System.String

    if not optimize compile all ok

    Why?

    I use bppc 6.30

    best regards
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    It is probably because you got null values in your database.
    You can use the IsNull keyword to check for null values.
     
  3. Allan

    Allan New Member Licensed User

    Erel,

    I am loading a table w/ cmd.ExecuteTable("tbl1",0) and it puts the nulls in the table columns.

    Sub tbl1_SelectionChanged (ColName, Row)
    if isnull(tbl1.Cell(ColName,Row)) then tFld.Text="" else tFld.Text = tbl1.Cell(ColName,Row)

    Causes 'Specified Cast is Invalid' Error
    Is there a way to detect the Nulls?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

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