SQLSelect into an Array
Barry G. Sumpter
barrysum at bigpond.net.au
Sat Sep 12 15:51:53 CDT 2009
Hi all,
Is there a way in Valentina to retrieve a Select Query Record Set straight
into an array?
I've got a static recordset of about 750 records that I need to loop thru
about 1000 times.
So instead of reading the db 750,000 times or looping thru the recordset
1000 times,
I thought moving the data into an array would be faster.
Would looping thru an array be faster?
Or is looping thru vCursor just another type of an array?
At the moment I only need 3 fields: RecID, SequenceID, and EvenName.
Thanks,
Barry G. Sumpter
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] On Behalf Of Barry G. Sumpter
Sent: Sunday, 13 September 2009 6:09 AM
To: 'Valentina Developers'
Subject: RE: Progress being made - need more help.
This was to show how to pull your data in from a db record for optimistic
editing.
The next was going to show how to update but it looks like you've already
sorted it out.
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] On Behalf Of Greg Olson-Hyde
Sent: Saturday, 12 September 2009 7:31 PM
To: Valentina Developers
Subject: Re: Progress being made - need more help.
Hi Barry,
Sorry to be so thick, but I just don't understand your code.
Greg
On 12/09/2009, at 5:24 PM, Barry G. Sumpter wrote:
while vCurs.NextRecord_ODBC
'intCntr = intCntr + 1
'arrayList.AddRow cstr(intCntr) + ") " + mRS.StringField(1).GetString +
mRS.StringField(2).GetString
'msgbox vCurs.StringField(2).Name
RecID = val(vCurs.StringField("RecID").getString)
TabName =(vCurs.VarCharField("TabName").getString)
Heading = (vCurs.VarCharField("Heading").getString)
Prompt = (vCurs.VarCharField("Prompt").getString)
Sequence = (vCurs.VarCharField("Sequence").getString)
maxLength = (vCurs.VarCharField("maxLength").getString)
Adjust = (vCurs.VarCharField("Adjust").getString)
Bold = (vCurs.VarCharField("Bold").getString)
MultiSelect = (vCurs.VarCharField("MultiSelect").getString)
multiSelectPrompt = (vCurs.VarCharField("multiSelectPrompt").getString)
.....
'Do something
.....
Wend
-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] On Behalf Of Greg Olson-Hyde
Sent: Saturday, 12 September 2009 4:37 PM
To: Valentina Developers
Subject: Progress being made - need more help.
Hi All,
First up, thanks to everyone who has helped me so far. When attempting
to compile my app using Valentina, I have managed to get the errors
down from 747, to 157 - a great sense of satisfaction - due to the
help offered by you all.
The next step for me is to understand how to deal with with the cursor
regarding records. The following are what I use in SQLite but don't
seem to have equivalents in Valentina:
RecordSet.Edit
RecordSet.InsertRecord
RecordSet.Commit - Is UpdateRecord the same as Commit?
>From what I have read Valentina does not deal with VCursor in the
same way as SQLite deals with a RecordSet in RB - but I can't figure
out how!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macserve.net/pipermail/valentina/attachments/20090913/d2dbf06a/attachment-0001.html
More information about the Valentina
mailing list