Record ID Problem

Michael Krugman admin at ktinet.net
Mon Nov 24 17:49:06 CST 2003


Hi Rusian and List:

I'm trying to convert my RB app, using the RB Database to Valentina.  I 
am able to create and open the database.  I use a listbox to display 
the contents.  With the RB database, the first field was the ID (Record 
ID).  I need to be able to display the record id with Valentina, just 
as I did with RB.  Below is the code that I used in RB, except for the 
GetString change at the end of each line.  ID represents the Record ID 
in the RB database.  Can someone take a look at this and give me an 
idea of how to display Valentina's record ID?  The rest of the code 
depends on the record id.  In my listbox, it should display as the 
first column.  Any help is appreciated.

Mike



   ////////////////////////////////////
   // Add a Specific Record to the List //
   ///////////////////////////////////
   dim curs as Databasecursor

   // Get the specific record into a DatabaseCursor
   curs = myDataBase.SQLSelect("SELECT  * FROM Clients WHERE ID =" + 
str(ID))


   // Since there is only one record we don't need to use a loop
   // Add row to the listbox
   Customers.addrow curs.Field("ID).GetString
   Customers.cell(customers.listCount-1, 1) = 
curs.Field("Last").GetString
   Customers.cell(customers.listCount-1, 2) = 
curs.Field("First").GetString
   Customers.cell(customers.listCount-1, 3) = 
curs.Field("Initial").GetString
   Customers.cell(customers.listCount-1, 4) = 
curs.Field("Social").GetString
   Customers.cell(customers.listCount-1, 5) = 
curs.Field("Address").GetString
   Customers.cell(customers.listCount-1, 6) = 
curs.Field("City").GetString
   Customers.cell(customers.listCount-1, 7) = 
curs.Field("State").GetString
   Customers.cell(customers.listCount-1, 8) = 
curs.Field("ZipCode").getString
   Customers.cell(customers.listCount-1, 9) = 
curs.Field("HomePhone").GetString
   Customers.cell(customers.listCount-1, 10) = 
curs.Field("WorkPhone").GetString



More information about the Valentina mailing list