logo       

Re: Recordset DB question: msg#03027

lang.realbasic.user

Subject: Re: Recordset DB question


On Jan 31, 2004, at 1:21 AM, Wade Little wrote:

I have not really sure how to get a value from the db and assign it to a popupmenu. I have been told to not use the dataqueary tool so I am doing it manually.

Here is a setup example of what I am trying to do. I issue to SQLSelect and make that equal to my Recordset rs. I then setup a do Loop but I dont know how to get the values from the recordset and place them in the popupmenu...


Dim rs as RecordSet
DIm dbField As DatabaseField

Dim dates As String
rs=db.SQLSelect("select GameDate from Game")
do
//How do I read teh values in the recordset?

//assuming that you put gameDate in to Game as a date
popupName.addRow rs.field("GameDate").dateValue.shortDate // assuming that the value of
// if you put gameDate in as a string then
popupName.addRow rs.field("GameDate").stringValue
//I would define encoding at the same time like
popupname.addrow rs.field("GameDate").stringValue.defineEncodings(encodings.UTF8)


rs.MoveNext
Loop until rs.EOF


Thanks for any help.
Wade



Does that help?

Sam D
- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>



- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise