There is not rly an error when i put
“Window1.Tabelle.AddRow( SQLDaten.Field(“BEN_ID”).stringvalue, SQLDaten.Field(“BenutzerName”).stringvalue )” in the code but it doesn’t add a row.
Listbox1.AddRow “”
LocRow = Listbox1.LastIndex
Listbox1.Cell(LocRow,0) SQL_Value // 0 is for the example, SQL_Value is the data that comes from your ODBC.[/code]
Now, you can check some values in the debugger: place a Berakpoint in your code and watch carefully what happens when you run, step by step your code.
Judging from your comments that a row is not being added, your original post showed these code lines:
while not SQLDaten.EOF
Window1.Tabelle.AddRow( SQLDaten.Field("BEN_ID") ) <----- This line
SQLDaten.MoveNext
wend
As a row was not added at all then I would suggest that the ‘while not SQLDaten.EOF’ is returning false, i.e. there is no data to show.
You will still be on the parking until you read the documentation and understand why Dave * (read above) is correct. Without giving a Type (.StringValue for example) so the field knows what type the data is to be returned.
AT LAST: imagine a second, even if you do not believe all advices people gave you here, go to the Xojo Example projects, ODBC folder (there are two projects) and make a search for .Field(. You will read the infamous .StringValue in that line.