Specified cast is not valid

Discussion in 'Questions (Windows Mobile)' started by bish0p, Jul 11, 2008.

  1. bish0p

    bish0p Member Licensed User

    I am attempting to pull Blob information from a DB and am not getting anywhere
    here is the code

    Dim blobdata(0) As Byte

    DBCMD.CommandText="Select * from logs"
    DBRead.Value=DBCMD.ExecuteReader
    Do While DBRead.ReadNextRow = True
    blobdata() = DBRead.GetBytes(2)
    For i = 0 To ArrayLen(blobdata()) - 1
    blobtext = blobtext & blobdata(i)
    Next

    Whenever it hits this line
    blobdata() = DBRead.GetBytes(2)

    I get a Specified cast is not valid

    I know that there is data in the DB

    Any Ideas?

    Thanks
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Please try to read the data with SQLite Viewer. Choose Show - Data over the right column and see if it works.
    This method uses GetBytes.
     
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