ODBC access (closing connections)

Roger.E.Eller at sealedair.com Roger.E.Eller at sealedair.com
Thu Mar 19 09:41:34 EDT 2009


On Mon, 24 Mar 2008 01:53:27 -0700, Sarah Reichelt wrote:
> Check out the docs for the revDataFromQuery function which I think
> will do what you want in a lot less code.
>
> I think your script can be condensed to:
>
> put revOpenDatabase("ODBC","testdb",,,) into myDB
> put "SELECT Item Id, Item Title from Item" into tSQL
> revDataFromQuery(tab,return,myDB,tSQL) into fld "Item List"
>
> Cheers,
> Sarah

Source:
http://www.mail-archive.com/use-revolution@lists.runrev.com/msg104599.html

First of all, when I need database tips, I search the list for "Sarah
Reichelt" because well... SHE'S AWESOME!  I have been using the above 3
lines very successfully in Rev 3.0 for accessing a Microsoft SQL database
via ODBC. I remember having to keep up with a connection id in the past,
and closing the database when done. Is that still required when using the
above method to retrieve a record? What happens if connections are left
open?

Roger Eller <roger.e.eller at sealedair.com>





More information about the use-livecode mailing list