CRUD SQL Lite Example ConnectionID issue
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
CRUD SQL Lite Example ConnectionID issue
I am using townsends CRUD SQL Lite example. I have created a sub stack that will act as my record editing window. When a user double clicks a row on the datagrid a new substack opens allowing them to edit the individual fields. I wonder do I need to create a whole new connection to the database to access it from the substack or can i use the same database connection and if so how?
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392
Re: CRUD SQL Lite Example ConnectionID issue
jesse wrote:I am using townsends CRUD SQL Lite example. I have created a sub stack that will act as my record editing window. When a user double clicks a row on the datagrid a new substack opens allowing them to edit the individual fields. I wonder do I need to create a whole new connection to the database to access it from the substack or can i use the same database connection and if so how?
2 points of view to consider :
-good practices : people advocate to open connexion / send the query / close connexion. Every time. Up to you.
-technical : you can of course keep the same connexion within a substack, simply by storing the connexion ID in a global variable.
Re: CRUD SQL Lite Example ConnectionID issue
Thanks. I want to follow best practice so I will go ahead and take your advice to open/close. I'm a php developer
so usually with PHP we just open the connection and keep it open during the life of the page so I guess
in comparison a stack should be looked at like a page.
so usually with PHP we just open the connection and keep it open during the life of the page so I guess
in comparison a stack should be looked at like a page.
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392