Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Specified cast is not valid


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-11-2008, 03:51 PM
Junior Member
 
Join Date: Mar 2008
Posts: 29
Default Specified cast is not valid

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
Reply With Quote
  #2 (permalink)  
Old 07-11-2008, 08:17 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,186
Default

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.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parameter is not valid lancaster Questions & Help Needed 2 10-27-2008 10:27 PM
Strange cast error agraham Beta Versions 1 10-11-2008 07:43 PM
Unable to cast Object Treeview.node Mr_Gee Questions & Help Needed 15 03-21-2008 07:13 PM
Specified cast is not valid skipper Questions & Help Needed 7 03-12-2008 08:17 AM


All times are GMT. The time now is 02:40 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0