Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Double in blob to string?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-17-2008, 06:28 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
Default Double in blob to string?

Hi,

A double is stored in a blob in a SQLite data base, say starting on position 16. I know the column, say 4. I didnt do that, for me it is a given fact. I need to 'read' this double from the blob and to convert it to a string, showing the value, say 1.234567. Can somebody help me?

Harry
Reply With Quote
  #2 (permalink)  
Old 12-18-2008, 09:09 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Get the blob as a byte array, data() = DataReader.GetBytes(column), then use my BytesConverter library http://www.basic4ppc.com/forum/addit...html#post14218 to convert the value you want. Watch out for possible little/bigendian problems depending upon the source of the data for the blob.

Note that, as documented in the help, the library converts one or more bytes of an array to a fundamental data type. Then Basic4ppc, which knows about all the fundamental types, converts that data on input into its own internal representation which is in fact a string.
Reply With Quote
  #3 (permalink)  
Old 12-18-2008, 04:14 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
Default Double in blob to string?

Thanks, Agraham.

I will try it, but it will take some time.

Harry
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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can string be converted to double? HARRY Questions (Windows Mobile) 1 12-15-2008 11:14 AM
Dim variable c% as Double colin9876 Basic4ppc Wishlist 8 05-28-2008 01:26 PM
Question: BLOB-Data within Tablecontrol ? schaujo Questions (Windows Mobile) 2 01-27-2008 05:49 PM
blob & image dennishea Questions (Windows Mobile) 13 08-31-2007 08:02 AM
SQL BLOB problem HARRY Questions (Windows Mobile) 9 05-10-2007 06:13 PM


All times are GMT. The time now is 08:00 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0