Mediator with MySql

Moderator: Rathinagiri

User avatar
Posts: 1449
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 4 times

Re: Mediator with MySql

Post by sudip »

rathinagiri wrote: Yes. I invoke the SQL query as and when we require the data.
Your method has one very useful feature, for multi-user environment, you can always get the latest data :)
rathinagiri wrote: This method would have some drawbacks too. In the case of remote server concept, the bandwidth may the problem. May be we should download the master data once and store locally in an array. Otherwise, for SQLite and LAN operated MySQL databases, SQL queries can be made as and when the data is required.
Yes :)
rathinagiri wrote: For changing table structure there is a command "alter table". I think we can write a safe user defined function for this.
Yes, I use following code in my VFP apps.

Code: Select all

Function AddField(cTablenm, cFieldnm, cTypeLen, cDefaultVal)

if !used(cTablenm)
**** used() function works differently in Fox
	use &cTablenm in 0
select &cTablenm
if type(cFieldNm) = "U"
	alter table &cTablenm add &cFieldnm &cTypeLen default &cDefaultVal

use in &cTableNm

* usage is like addfield("Emp", "Basic", "n(10, 2)", "0.00")
I am also thinking about same type of function with Sqlite ;)

Size of our Sqlite-app code is generally bigger than Dbf-apps. I am thinking about some functions, which will reduce the size :) (Yes, I am lazy programmer :lol: )

With best regards.

With best regards,

Post Reply