
urgent! need help with database bindings
Thanks all for your replies..Actually I did what I needed to do at the
time with:
dcurs = d.sQLSelect("select StudentName from " +
winselectClass.popClassTables.text)
u = dcurs.FieldCount
me.deleteAllRows
while not dcurs.eof
for i = 1 to u
fld =dcurs.idxfield(i)
me.AddRow fld.StringValue
next
dcurs.movenext
wend
d.Close
I don't know if this was the most efficient way, but after hours of
tinkering, this is all that worked. Unfortunately, my next problem is
that I want to select the data and set the captions of an array of
bevelbuttons with the values. I'm trying this:
dcurs = d.sqlselect("select Subjects from "
+winSelectClass.popClassTables.text)
u = dcurs.FieldCount
while not dcurs.eof
for i = 1 to u
fld =dcurs.idxfield(i)
bevelbutton1(i).Caption = fld.StringValue
bevelbutton1(i).visible = true
dcurs.Movenext
next
wend
d.Close
but it is only setting the caption of the first button (I've tried
making all buttons visible by default but still only the first has a
caption). Once again pulling out hair.
Nelson
Quote:
> If I understand your question, what you need to do is use a string
> property in your other woindow and pass the sql to it.
> so in window one, in the change event of the popup:
> window2.sqlproperty = "SELECT StudentName FROM " + popupmenu1.text
> then in window2, use that property as your query.
> Does that help