Dumping experiment etc.

Francois Van Lerberghe fvanlerberghe at freegates.be
Mon Sep 1 20:53:18 CDT 2003


le 1-09-03 16:03, Chuck <rwc1717 at shaw.ca> a écrit :

> Hi Ruslan:
> I hope you don't mind but I have to keep working on my project...and I am
> redesigning the backup system....but I promise I that I will get you the
> offending 
> database file to experiment with.
> 
> Now some questions about getting data out of a blob field and the getrecid
> field using the following methods...
> 
> rsV = mdb.sqlselect(select * from crecord where incidrec ='"+avalue+"'")
> res = rsV.FirstRecord
> 
> Input (1,1) = rsV.Field("lname").SetString

Mmmh, I suppose you mean
    Input (1,1) = rsV.Field("lname").GetString
                                     ^^^

> 
> now the next field is a blob file but
> 
> Input (1,2) = rsV.Field("imageone").Readrawdata

You must typecast the VField  (rsV.Field("imageone")) :

    Input (1,2) = rsV.BlobField("imageone").readRawData

See the "V4RBReference.pdf" manual (p 64).

> also I can't find any notes on....the syntax for....GetRecID
> 
> Input(1,3) = rsV.Field(" what do I put in here to get the recid? ").???? and
> here?

you must include the RecID in the fieldList of the query :

    rsV = mdb.sqlselect(select RecID,* from crecord where ...

Now you can access its value as other fields :

    Input(1,3) = rsV.Field("RecID").GetString
or
    Input(1,3) = rsV.ULongField("RecID").Value
or
    Input(1,3) = rsV.ULongField(1).Value

Best regards.

François Van Lerberghe
Thier Monty, 15A
B-4570 Marchin
Belgique



More information about the Valentina mailing list