VDN - VCursor: get field name & EOF

Fran=?ISO-8859-1?B?5w==?=ois Van Lerberghe frvanlerberghe at gmail.com
Fri Mar 7 07:34:46 CST 2014


In Xojo/RealBasic, I do this :

1.

  Dim csr As Vcursor
  Dim n, nbFld As Integer

  csr = ... (your SQL query)
  nbFld = csr.FieldCount

  For n = 1 to nbFld
    theFieldTilte = csr.Field(n).name
    ...
  Next

2. Instead of Vcursor.EOF, I use Vcursor.NextRecord = False

  Do
    ...
  Loop until NOT Vcursor.NextRecord

You can also use Vcursor.RecordCount in order to know the last record.

Cheers.

François Van Lerberghe
Rue Thier Monty, 15 A
4570 Marchin
+32 (0)85 25 08 25



le 7/03/14 13:01, Johnny Harris <johnny at southshore.com> a écrit :

> Hi Everyone,
> 
> I¹m starting back on a .Net project that I intend to use Valentina with. I¹m
> needing to load my data into a DataTable.
> 
> 1. How can I loop through a VCursor and get all of the field names from my SQL
> query? 
> 
> 2. Does VCursor.EOF work? It seems to me that it never returns true in a while
> loop.
> 
> I¹ve looked through the docs but must be missing something.
> 
> 
> Best Regards,
> Johnny Harris
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
> 



More information about the Valentina mailing list