Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 To: Arjun/Sangeeta Yadav
  Where is Arjun/Sangeeta Yadav?
 kolkata
 India
 Arjun/Sangeeta Yadav
 Tags
Subject: RE: how to select more than one tables
Thread ID: 395955 Message ID: 395956 # Views: 57 # Ratings: 2
Version: Visual FoxPro 9 Category: Web Applications
Date: Tuesday, January 21, 2014 8:31:45 PM         
   


> 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


Never, never fetch the whole table. Get only these records you need.

-----------------
Borislav Borissov

Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.

ENTIRE THREAD

how to select more than one tables Posted by sangeeta yadav @ 1/21/2014 8:20:58 PM
RE: how to select more than one tables Posted by Borislav Borissov @ 1/21/2014 8:31:45 PM
RE: how to select more than one tables Posted by sangeeta yadav @ 1/21/2014 8:42:52 PM
RE: how to select more than one tables Posted by Borislav Borissov @ 1/21/2014 8:56:46 PM
RE: how to select more than one tables Posted by sangeeta yadav @ 1/21/2014 10:58:50 PM
RE: how to select more than one tables Posted by Borislav Borissov @ 1/22/2014 12:08:33 AM
RE: how to select more than one tables Posted by sangeeta yadav @ 1/22/2014 4:38:09 PM
RE: how to select more than one tables Posted by David Mustakim @ 1/22/2014 12:22:27 AM
RE: how to select more than one tables Posted by Pete Sass @ 1/22/2014 1:22:28 AM
RE: how to select more than one tables Posted by sangeeta yadav @ 1/22/2014 4:37:11 PM