BBjRecordSet::getFileName

Description

In BBj 15.0 and higher, this method returns the filename from a BBjRecordSet.

Syntax

Return Value

Method

String

getFileName()

Parameters

None.

Return Value

Returns the filename from a BBjRecordSet.

Remarks

Returns null() if this BBjRecordSet doesn't have a filename.

Example

rem ' BBjRecordSet::getFileName

rem ' First, create a data file
filename$ = "BBjRecordSet.dat"
modes$ = ""
template$ = "state:c(2),name:c(16*=)"
erase filename$,err=*next
mkeyed filename$,2,0,32
channel = unt
open (channel)filename$
dim rec$:template$

rem ' Load the file with state codes and names
while 1
dread rec.state$,rec.name$,end=*break
write record (channel,key=rec.state$)rec$
wend
close (channel)

rem ' Create the RecordSet
RecordSet! = bbjapi().createFileRecordSet(filename$,modes$,template$)

rem ' Report details about the RecordSet
print "BBjRecordSet::getFileName() = '",RecordSet!.getFileName(),"'"
print "BBjRecordSet::getMode() = '",RecordSet!.getMode(),"'"
print "BBjRecordSet::getTemplate() = '",RecordSet!.getTemplate(),"'"
print "BBjRecordSet::getQuery() = '",RecordSet!.getQuery(),"'"
print "BBjRecordSet::getConnectString() = '",RecordSet!.getConnectString(),"'"
print "BBjRecordSet::isUpdatable() = '",RecordSet!.isUpdatable(),"'"
print "BBjRecordSet::isScrollSensitive() = '",RecordSet!.isScrollSensitive(),"'"

rem ' Go to the first record
RecordSet!.first()

rem ' Retrieve the RecordData for the current record
RecordData! = RecordSet!.getCurrentRecordData()

rem ' Print the RecordData
print "The first record is:",'LF',RecordData!,

stop

data "AK","Alaska"
data "AL","Alabama"
data "AR","Arkansas"
data "AZ","Arizona"
data "CA","California"
data "CO","Colorado"
data "CT","Connecticut"
data "DC","District of Columbia"
data "DE","Delaware"
data "FL","Florida"
data "GA","Georgia"
data "GU","Guam"
data "HI","Hawaii"
data "IA","Iowa"
data "ID","Idaho"
data "IL","Illinois"
data "IN","Indiana"
data "KS","Kansas"
data "KY","Kentucky"
data "LA","Louisiana"
data "MA","Massachusetts"
data "MD","Maryland"
data "ME","Maine"
data "MI","Michigan"
data "MN","Minnesota"
data "MO","Missouri"
data "MS","Mississippi"
data "MT","Montana"
data "NC","North Carolina"
data "ND","North Dakota"
data "NE","Nebraska"
data "NH","New Hampshire"
data "NJ","New Jersey"
data "NM","New Mexico"
data "NV","Nevada"
data "NY","New York"
data "OH","Ohio"
data "OK","Oklahoma"
data "OR","Oregon"
data "PA","Pennsylvania"
data "PR","Puerto Rico"
data "RI","Rhode Island"
data "SC","South Carolina"
data "SD","South Dakota"
data "TN","Tennessee"
data "TX","Texas"
data "UT","Utah"
data "VA","Virginia"
data "VI","Virgin Islands"
data "VT","Vermont"
data "WA","Washington"
data "WI","Wisconsin"
data "WV","West Virginia"
data "WY","Wyoming"

See Also

BBjAPI

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.



______________________________________________________________________________________

Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.