Specified cast is not valid

bish0p

Member
Licensed User
Longtime 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
 
Top