Activex SelectedRecords No Workie -
02-11-2005
, 03:18 PM
Hi, Hope a guru can help me with this. I create the VAccess in code
and the following works just great, but something tells me that I am
not performing this as efficently as possible. I can't seem to get the
SelectedRecords property to work for me so I do it this way instead. I
don't know if it my placement of the "init"'s or the quotes in the
SelectedRecords or the improper use of GetNextExtended as opposed to
StepNextExtended and the use of GetFirst or what? I think that I have
tried everything!
As you can see with the code below, I point to the beginning of the
place where the index begins for that date and time etc and it works
properly,but I have to test for a change in the XACT_DATE field to know
when to stop reading the file, once again seemingly ineffecient.
Could someone use my example and show me how to use the SelectedRecords
property using my example? (assuming this is the better solution)
Please keep in mind that I am doing all of this in code and that there
is no form. Also I am unsure about the quotes to use for
SelectedRecords.
SITENUMBER is an integer and the others are pervasive date fields.
Thanks in advance for any insight!
-Henry
With PervasiveDB
.AutoOpen = False
.AutoMode = False
.TableName = MyTable
.Location = MyLocation
.ExtendedOps = True
.SelectedFields = "XACT_TIME,LINE_NUMBER,XACT_DATE" '...Etc
.IndexNumber = 3
.FieldValue("ORIG_SITE_NUMBER") = SiteNumber
.FieldValue("XACT_DATE") = ThisDate
.FieldValue("XACT_TIME") = "00:00:00"
DayCompare = ThisDate
stat = .GetGreaterOrEqual
.Init
Do While stat = 0
stat = .GetNextExtended 'got it
For r = 1 To .Rows
If Day(.RowColumnValue(r, 3)) <> DayCompare Then Exit Do
.....ETC |