Article View: borland.public.vdbase.data.sql
Article #1172Help Please!! findKey()!! does it work??
From: Dave Bailey
Date: Fri, 24 Apr 1998 00:00
Date: Fri, 24 Apr 1998 00:00
104 lines
3005 bytes
3005 bytes
In the following code (the ? are to display what is happenning;
yes, I know I could be using the debugger), the following occurs:
1) the findKey() method, does not go to the row with that value
in the key (I know the record does exist).
2) the display is false for that line of code.
3) the line of code to display the indexName is blank
(the table does definately have the order tag that is in
the indexName property and it is a numeric field).
parameter bModal
local f
f = new testForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class testForm of FORM
with (this)
onOpen = class::FORM_ONOPEN
onClose = class::FORM_ONCLOSE
scaleFontBold = false
colorNormal = "cyan"
height = 9.8636
left = 25
autoCenter = true
top = 0
width = 56.8571
text = "Item File Download"
endwith
this.SESSION1 = new SESSION()
this.SESSION1.parent = this
with (this.SESSION1)
left = -0.1429
top = -0.0455
lockRetryInterval = 0
endwith
this.DATABASE1 = new DATABASE()
this.DATABASE1.parent = this
with (this.DATABASE1)
left = 4
top = -0.0455
session = form.SESSION1
databaseName="DbSpsourc"
endwith
this.QUERY1 = new QUERY()
this.QUERY1.parent = this
with (this.QUERY1)
left = 8
top = -0.0455
session = form.SESSION1
database = form.database1
sql = "select * from UPDTUSGE"
indexName = "IMPRNT"
endwith
this.TXT_MSG1 = new TEXT(this)
with (this.TXT_MSG1)
height = 2
left = 1
top = 1.5
width = 54
border = true
colorNormal = "blue/cyan"
fontName = "Comic Sans MS"
fontSize = 18
text = "Updating the Item Files Now..."
borderStyle = 5 // Double
endwith
function form_onClose
form.Query1.active=false
form.Database1.active=false
form.Release()
return
function form_onOpen
form.Database1.active=true
form.Query1.active=true
? form.Query1.Rowset.fields["IMPRNT"].value
? form.Query1.Rowset.rowNo()
? form.Query1.Rowset.findKey(14826)
? form.Query1.Rowset.fields["IMPRNT"].value
? form.Query1.Rowset.rowNo()
? form.Query1.Rowset.indexName
? form.Query1.Rowset.next()
? form.Query1.Rowset.fields["IMPRNT"].value
? form.Query1.Rowset.rowNo()
WAIT
form.Close()
return
endclass
Technical Details
Message-ID:
<01bd6fa5$a4f5c8a0$4402a8c0@cps1>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,16983a1f47d50c28,start X-Google-Attributes: gidff5a1,public From: "Dave Bailey" <cal-pak@ix.netcom.com> Subject: Help Please!! findKey()!! does it work?? Date: 1998/04/24 Message-ID: <01bd6fa5$a4f5c8a0$4402a8c0@cps1> X-Deja-AN: 347349560 Organization: Netcom X-NETCOM-Date: Fri Apr 24 12:23:13 PM CDT 1998 Newsgroups: borland.public.vdbase.data.sql