Am I too old to learn Valentina?

Thorsten Hohage thohage at genericobjects.de
Sun Sep 6 04:15:51 CDT 2009


Hi Greg,

On 2009-09-06, at 10:35, Greg Olson-Hyde wrote:

> However, my app won't compile and has 747 errors (mainly concerning
> RecordSets, Errors, Commits and Inserts) that I am going to have to go
> through manually and fix - a daunting task!

This scenario would be a good point to start an additional re-design  
and not only convert to Valentina, but try to use a database-layer, a  
class in RB where all the database logic, database access, ... is  
bundled and NO sql and no explicit database access code anywhere else.

If you have successfully done this step you can easily do more things,  
e.g. convert the app to use SQL and not API way or anything else  
regarding persistence.



> I seem to get stuck on the little things - such as:
>
>   Dim vBusinessTable As VTable
>   Dim piStatus As Integer
>   vBusinessTable = EnglishDB.Table( "tblBusiness" )
>   piStatus = vBusinessTable.Field("ibRegoStatusQU").GetString
>
> In the last line RB wants an integer, not a string, (as it should) so
> I changed it to:
>
>   piStatus = val(vBusinessTable.Field("ibRegoStatusQU").GetString)


Check this page as a start

	<http://valentina-db.com/dokuwiki/doku.php?id=valentina:products:adk:api:api 
 >

So VField can be used, of course, but in some cases it is more a  
"superclass" and you should use the specific type, so for your given  
code about you perhaps should use VLong or VShort.

How to access these you should read this page

	<http://valentina-db.com/dokuwiki/doku.php?id=valentina:products:adk:api:vcursor_class:cast_field_methods&s[]=datetimefield 
 >



So your code should looks like

	piStatus = vBusinessTable. LongField("ibRegoStatusQU").Value



regards,

Thorsten Hohage
-- 

Valentina Technology Evangelist
generic objects  GmbH - Leiter Solution Center Nord



More information about the Valentina mailing list