Database Strategy

mike at doub.com mike at doub.com
Wed Nov 16 12:03:00 EST 2011


I am new to the world of databases and I need some advise.  

I am currently opening and closing the database in the open and close stack handlers. I am storing the connection I'd in a custom stack property. 

When I go to a card, I am creating a cursor, directly loading each record  into the datagrid.  Upon closing the card I close the cursor. 

Now this works fine when I load rev for the first time and go to the card with the datagrid.  When I leave the card and return, I am getting errors indicating I have invalid cursor ID. 

So should I be opening and closing the entire database in the card?
I am not seeing anything wrong examining the close cursor function. 

As a separate question can you have multiple cursors open at the same time.  I would think so. 

Thanks in advance. 

  -= Mike
 

Sent from my BlackBerry device on the Rogers Wireless Network




More information about the use-livecode mailing list