[Gambas-user] prb:Connection.Exec() bypass sql code

Benoit Minisini benoit.minisini at ...2...
Sun Apr 30 00:14:44 CEST 2006


On Sunday 30 April 2006 00:08, ron wrote:
>
> May I suggest in that case to add a method .UseTable(tablename as string)
> that do the "select * from tablename" and a .MoveFirst() automatic.
> In that way you can direct use the Result without additional commands.
>
>   hResult = hConn.UseTable("mytable")
>   for each hResult
>     print hResult["fieldname"] ' do something
>   next
>

Do 'hResult = hConn.Find("mytable")', that's all.

Use DB.Debug=TRUE to understand what DB.Create(), DB.Find(), DB.Edit(), and 
Result.Update() do.

Regards,

-- 
Benoit Minisini





More information about the User mailing list