> > Hi Experts,> > > > this is the content of conn.prg> > > > CONNECTION_VAR = SQLSTRINGCONNECT("Driver={MySQL ODBC 5.1 Driver};Server=sql4.xxxxxxxxxx.net;Database=sql??????;User=sql??????; Password=dQ9%vJ9*;Option=3;")> > -----------------------------------------------------------------------------------------------------------> > > > > > > > This is how i fetch data from the remote server into my local machine for entry,edit and delete.> > > > > > DO CONN> > SQL_COMMAND="SELECT * FROM agentmast WHERE ACTIVE='YE'"> > IF SQLEXEC(CONNECTION_VAR,SQL_COMMAND,"MYSQLAGENTMAST")>0> > SELECT MYSQLAGENTMAST> > ENDIF> > > > > > SQL_COMMAND="SELECT * FROM agentlevel"> > IF SQLEXEC(CONNECTION_VAR,SQL_COMMAND,"MYSQLAGENTLEVEL")>0> > SELECT MYSQLAGENTLEVEL> > ENDIF> > > > > > SQL_COMMAND="SELECT * FROM statemast"> > IF SQLEXEC(CONNECTION_VAR,SQL_COMMAND,"MYSQLSTATEMAST")>0> > SELECT MYSQLSTATEMAST> > ENDIF> > > > > > SQL_COMMAND="SELECT * FROM citymast"> > IF SQLEXEC(CONNECTION_VAR,SQL_COMMAND,"MYSQLCITYMAST")>0> > SELECT MYSQLCITYMAST> > ENDIF> > > > > > Now my Question: Is there any better and compact way of fetching remote data into local machine together ? > > i.e, fetching all data from agentmast,agentlevel,statemast and citymast together.> > > > if we can do so it will reduce the fetching time of data and enhance the speed of the application users will appreciate this.> > > > > > my second question is a related one, what if we forget to closed the connection once it is opened for fetching data, what will be its impact on the application.> > > > > > Thanks & Regards> > > Hi,> > QUESTION: Is there any better and compact way of fetching remote data into local machine together ? > i.e, fetching all data from agentmast, agentlevel, statemast and citymast together.> ANSWER: Not 100% sure of how your screen display screen logic is setup, but I normally fetch my> tables separately unless I have a definite Parent->Child situation such as in an Invoice Header> table and Invoice Details table.> I definitely seldom select * and seldom if never select from any remote tables without a WHERE condition> to narrow the recordset.> > QUESTION: What if we forget to closed the connection once it is opened for fetching data, what will be > its impact on the application.> ANSWER: None really. I generally close the connection when I exit the application.> > There are cases using MySQL where there is a connection timeout that you may need to change the value of> so the connection does not close itself down.> > Pete "the IceMan", from the Great White North of Canada.> www.marathongriffincomputers.com