VDN - VCursor: get field name & EOF
Johnny Harris
johnny at southshore.com
Fri Mar 7 21:31:35 CST 2014
I think I figured it out.
I was declaring my counter for the field index as an integer.
I changed the counter declaration to uShort and the autocomplete is working.
Regards,
Johnny Harris
-----Original Message-----
From: Johnny Harris
Sent: Friday, March 07, 2014 9:23 PM
To: Valentina Developers
Subject: Re: VDN - VCursor: get field name & EOF
Thank you François for helping,
For some reason in the VS 2013 IDE the auto complete does not provide an
option for field(n).name.
It does show field("fieldName").Name.
The Valentina .Net documentation shows a vField.Name property, but it
doesn't seem to work.
At least I can't seem to make it work.
#2 works great.
Once again... Thank you.
Johnny Harris
-----Original Message-----
From: François Van Lerberghe
Sent: Friday, March 07, 2014 7:34 AM
To: Valentina List
Subject: Re: VDN - VCursor: get field name & EOF
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
>
_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina
_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list