Page 1 of 1

Direct and Indirect accessing Table

Posted: Tue Nov 10, 2009 3:21 pm
by sudip
Hello Friends,

We can access tables for data manipulation both Directly and Indirectly (using memory variables or temporary/memory tables).

I prefer indirect method because
1) Less data corruption.
2) Using SQL tables.

Can you please send your views regarding this :)

Thanks in advance :)

With best regards.

Sudip

Re: Direct and Indirect accessing Table

Posted: Tue Nov 10, 2009 3:33 pm
by Rathinagiri
In this regard, these are my views/experiences.

Previously, when I use dbf tables alone, I directly handled data without much of temporary variables.

As time passed by, I started using SQL record sets and I stored the record sets in temporary variables.

Now, I use SQL record sets but reduced the usage of temporary variables/arrays. ie., I store the values directly in HMG controls like textbox, grid etc., This had improved the coding and variable handling a LOT.

Re: Direct and Indirect accessing Table

Posted: Tue Nov 10, 2009 4:06 pm
by sudip
rathinagiri wrote: Now, I use SQL record sets but reduced the usage of temporary variables/arrays. ie., I store the values directly in HMG controls like textbox, grid etc., This had improved the coding and variable handling a LOT.
Great :) If your code directly stores table data in form controls (without storing the recordset into an array)? If yes (now you know what I am going to ask ;) ) can you please send a small sample?

With best regards.

Sudip

Re: Direct and Indirect accessing Table

Posted: Tue Nov 10, 2009 5:31 pm
by Rathinagiri
Hi Sudip,

In this place, I am to say negative. Since harbour and SQL API's deals record sets in arrays, when getting the record sets ("select" queries), I am bound to use array variables.

Re: Direct and Indirect accessing Table

Posted: Wed Nov 11, 2009 2:32 am
by sudip
Thanks a lot Friend :)
So, we may say that using SQL we use indirect accessing table using temporary array (unlike BROWSE) :)
If SQLRDD is capable to manipulate data in tables using ordinary xBase commands, we can use direct access with SQL tables also. Am I correct?
With best regards.
Sudip