Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

populating listbox

Status
Not open for further replies.

thegame8311

Technical User
Jan 6, 2012
133
US
greetings

I can seem to populate my listbox. When I run my code nothing is showing in the listbox

here's what I have so far:

Code:
LPARAMETERS cItem

lp1.listbox1.RowSourceType = 3
lp1.listbox1.RowSource = "SELECT * FROM LivePlayers INTO CURSOR myCursor"

lp1.listbox1.value = myCursor.pid

I have values in my table, so what could I be missing?
 
Now this code is giving me fits

on the fwrite line

Code:
lnFileHandle3 = FCREATE('C:\Stats3.txt') && creating final file

PUBLIC newline3

*lnCount3 = OCCURS(',', z)*

LOCAL lnFileHandle7 && numeric file handle

lnFileHandle7 = FOPEN( "C:\Stats2.txt") && open previous file for reading

IF lnFileHandle7 = -1

   && error, could not open the file

   && do something to handle the error

   RETURN

ENDIF

LOCAL lcLine && define a variable to hold each line

DO WHILE NOT FEOF( lnFileHandle7) && loop through the file

   lcLine = FGETS( lnFileHandle7) && store each line in lcLine
   
   lp1.text3.value = GETWORDCOUNT(lcLine)
   
   FWRITE(lnFileHandle3, GETWORDCOUNT(lcLine))
   
ENDDO 

FCLOSE(lnFileHandle3)
FCLOSE(lnFileHandle7)
 
You can only FWRITE() strings into a file, GETWORDCOUNT() returns a number.

Bye, Olaf.
 
Sorry I meant to start that on a new post, I will do that
 
I resolved it, thanks for the ideas, you guys are awesome
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top