Alaska Software Inc. - ADS opening dbf with same name, different location
Username: Password:
AuthorTopic: ADS opening dbf with same name, different location
Pintr BalzsADS opening dbf with same name, different location
on Wed, 07 Feb 2018 10:58:02 +0100
Hi,

Is it possible to open and use databeses with same name but different 
location via ADS at the same time?
I can do it using alias names without ADS. Is it possible to open one dbf 
using ADS and t other with
DBFNTX driver at the same time?

TIA

Balas Pinter
Chris ChambersRe: ADS opening dbf with same name, different location
on Sat, 10 Feb 2018 22:00:53 -0800
On 2/7/2018 1:58 AM, Pint�r Bal�zs wrote:
> Hi,
> 
> Is it possible to open and use databeses with same name but different
> location via ADS at the same time?
> I can do it using alias names without ADS. Is it possible to open one dbf
> using ADS and t other with
> DBFNTX driver at the same time?
> 
> TIA
> 
> Balas Pinter
> 
> 

Hi Balas,
Each table needs a unique alias in whatever thread you are in, so you 
can open the same table multiple times in the same area with different 
aliases as you suggested. Yes you can cross pollinate, so to speak with 
different DBE drivers at the same same time time. Just remember that 
your ADS connection needs the ADSDBE or Session object placed in your 
DBUSAREA statement. Your ADS table would likely be a free table rather 
than one contained in an ADS Data Dictionary. The DBFNTX is already 
native to Xbase++. As long as you are not use a Default DBE setting in 
that particular thread.

Glad to help if you need it.

Regards

Chris C
http://chrischambers.ca
Tim CallahanRe: ADS opening dbf with same name, different location
on Sun, 11 Feb 2018 11:07:06 -0800
On Wed, 07 Feb 2018 10:58:02 +0100, "Pintér Balázs"
<recias@mai.datanet.hu> wrote:

Here's a code snippet that illustrates how to do it. It uses the
FOXCDX driver but DBFNTX is simiilar.

    Load DBEs
   DbeLoad('FOXDBE')
   DbeLoad('CDXDBE')
   DbeBuild('FOXCDX', 'FOXDBE', 'CDXDBE' )
   Dbeload('ADSDBE')

    Connecct to ADS server using data dictionary
   cConnectString := 'DBE=ADSDBE;\\myserver\data\mydb.add'
   oSession       := DacSession():new(cConnectString)

    Open CUSTOMER table from ADS as CUSTOMER1
   dbusearea(.t., oSession, 'customer', 'customer1', .t.)

    Open free CUSTOMER table as CUSTOMER2
   dbusearea(.t., 'FOXCDX', 'C:\data\customer.dbf', 'customer2', .t.)
>Hi,
>
>Is it possible to open and use databeses with same name but different 
>location via ADS at the same time?
>I can do it using alias names without ADS. Is it possible to open one dbf 
>using ADS and t other with
>DBFNTX driver at the same time?
>
>TIA
>
>Balas Pinter 
>
Tim CallahanRe: ADS opening dbf with same name, different location
on Sun, 11 Feb 2018 11:09:54 -0800
On Sun, 11 Feb 2018 11:07:06 -0800, Tim Callahan wrote:

Ooops - the connection string is missing the SERVER spec - it should
be:

cConnectString := 'DBE=ADSDBE;SERVER=\\myserver\data\mydb.add"


>On Wed, 07 Feb 2018 10:58:02 +0100, "Pintér Balázs"
><recias@mai.datanet.hu> wrote:
>
>Here's a code snippet that illustrates how to do it. It uses the
>FOXCDX driver but DBFNTX is simiilar.
>
>    Load DBEs
>   DbeLoad('FOXDBE')
>   DbeLoad('CDXDBE')
>   DbeBuild('FOXCDX', 'FOXDBE', 'CDXDBE' )
>   Dbeload('ADSDBE')
>
>    Connecct to ADS server using data dictionary
>   cConnectString := 'DBE=ADSDBE;\\myserver\data\mydb.add'
>   oSession       := DacSession():new(cConnectString)
>
>    Open CUSTOMER table from ADS as CUSTOMER1
>   dbusearea(.t., oSession, 'customer', 'customer1', .t.)
>
>    Open free CUSTOMER table as CUSTOMER2
>   dbusearea(.t., 'FOXCDX', 'C:\data\customer.dbf', 'customer2', .t.)
>>Hi,
>>
>>Is it possible to open and use databeses with same name but different 
>>location via ADS at the same time?
>>I can do it using alias names without ADS. Is it possible to open one dbf 
>>using ADS and t other with
>>DBFNTX driver at the same time?
>>
>>TIA
>>
>>Balas Pinter 
>>
Pintr BalzsRe: ADS opening dbf with same name, different location
on Mon, 12 Feb 2018 10:48:30 +0100
Hi,

thank You the information.

Best regards,

Balazs Pinter


<Tim Callahan> az albbiakat rta a kvetkezo hrzenetben: 
46518dhpairboqug2jf18c9dvn14fcfn24@4ax.com...
> On Sun, 11 Feb 2018 11:07:06 -0800, Tim Callahan wrote:
>
> Ooops - the connection string is missing the SERVER spec - it should
> be:
>
> cConnectString := 'DBE=ADSDBE;SERVER=\\myserver\data\mydb.add"
>
>
>>On Wed, 07 Feb 2018 10:58:02 +0100, "Pintr Balzs"
>><recias@mai.datanet.hu> wrote:
>>
>>Here's a code snippet that illustrates how to do it. It uses the
>>FOXCDX driver but DBFNTX is simiilar.
>>
>>    Load DBEs
>>   DbeLoad('FOXDBE')
>>   DbeLoad('CDXDBE')
>>   DbeBuild('FOXCDX', 'FOXDBE', 'CDXDBE' )
>>   Dbeload('ADSDBE')
>>
>>    Connecct to ADS server using data dictionary
>>   cConnectString := 'DBE=ADSDBE;\\myserver\data\mydb.add'
>>   oSession       := DacSession():new(cConnectString)
>>
>>    Open CUSTOMER table from ADS as CUSTOMER1
>>   dbusearea(.t., oSession, 'customer', 'customer1', .t.)
>>
>>    Open free CUSTOMER table as CUSTOMER2
>>   dbusearea(.t., 'FOXCDX', 'C:\data\customer.dbf', 'customer2', .t.)
>>>Hi,
>>>
>>>Is it possible to open and use databeses with same name but different
>>>location via ADS at the same time?
>>>I can do it using alias names without ADS. Is it possible to open one dbf
>>>using ADS and t other with
>>>DBFNTX driver at the same time?
>>>
>>>TIA
>>>
>>>Balas Pinter
>>>