[Gambas-user] Extracting fields from a Result

Doug Hutcheson owlbrudder at gmail.com
Sun Dec 31 23:56:36 CET 2017


Good idea Lee - I will fire up MySql on my machine and try a similar
approach.

Using PostgreSQL, the For loop using a loop index works perfectly,
showing the field names and the data, but the For Each loop fails on
the 'For Each ... ' line.

I will get back to the list about MySql.

Doug

On Sun, 2017-12-31 at 12:49 -0500, T Lee Davidson wrote:
> Yes, MyResult!txtMasterDatabase should work. (Did you copy/paste that name, or type it in directly?) The For Each loop should
> work as well.
> 
> I tried a simple command-line application on a MySQL data table with just one row. All the application does is, first connect to
> the database, and then 'MyResult = hConn.Exec("select * from users")'
> 
> A For Each loop prints the field names just fine. And, 'Print MyResult!id' displays the correct value.
> 
> Perhaps there is a bug in the Gambas PostgreSQL driver. Can you test on a MySQL table to see if that works for you?
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180101/251c53c5/attachment.html>


More information about the User mailing list