Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Using ADT and DBF at the same time

6 posts in Xbase++ Last posting was on 2008-01-09 14:33:09.0Z
Pascal Boivin Posted on 2007-10-12 14:35:50.0Z
Message-ID: <NBTM6AB221D0@nbautomation.mailtraq>
To: Advantage.Xbase++
Date: Fri, 12 Oct 2007 10:35:50 -0400
Lines: 32
From: "Pascal Boivin" <pascal.boivin@nbautomation.com>
Subject: Using ADT and DBF at the same time
Newsgroups: Advantage.Xbase++
User-Agent: XanaNews/1.18.1.6
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
NNTP-Posting-Host: 69.70.11.19
X-Trace: 12 Oct 2007 08:32:09 -0700, 69.70.11.19
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!nbautomation.mailtraq!anonymous
Xref: solutions.advantagedatabase.com Advantage.Xbase++:820
Article PK: 1140694

Hi

I have many softwares that were written for Clipper in the '90, then
converted to XBase++. They all use ADSDBE for their database engine,
and all files are .DBF (connected using ADS free connection).

I would like to add new functions that use .ADT without using a
dictionnary (most of my customers don't have a dictionnary yet).

In Alaska documentation for ADSDBE 1.90, I notice this:

DbeInfo( COMPONENT_DATA , ADSDBE_TBL_MODE, ADSDBE_ADT )
DbeInfo( COMPONENT_ORDER, ADSDBE_TBL_MODE, ADSDBE_ADT )

I fear my application will not work if I add this because it will
change all files access.

So what is the trick to use DBF and ADT at the same time without using
dictionnary?

Another question, how do I recover AutoIncrement value?

Currently, almost all my apps use Alaska XBase 1.82 but I will convert
them to 1.90. ADS is either 7.x or 8.x

Thanks
--
************************
* Pascal Boivin *
* N.B. Automation inc. *
************************


Data Devices Posted on 2007-10-13 06:36:50.0Z
From: Data Devices <kiron@datadevicesindia.com>
Newsgroups: Advantage.Xbase++
Subject: Re: Using ADT and DBF at the same time
Date: Sat, 13 Oct 2007 12:06:50 +0530
Message-ID: <3np0h31hhipvi6r31h7ril9lpo6cj0mlvf@4ax.com>
References: <NBTM6AB221D0@nbautomation.mailtraq>
X-Newsreader: Forte Agent 3.2/32.830
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 122.167.53.114
X-Trace: 13 Oct 2007 00:31:39 -0700, 122.167.53.114
Lines: 13
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!122.167.53.114
Xref: solutions.advantagedatabase.com Advantage.Xbase++:824
Article PK: 1140695

On Fri, 12 Oct 2007 10:35:50 -0400, "Pascal Boivin"
<pascal.boivin@nbautomation.com> wrote:
Hi

>So what is the trick to use DBF and ADT at the same time without using
>dictionnary?

I think better solution will be "create seperate session for ADT and
DBF handling ".


Regards
Kiron


Data Devices Posted on 2007-10-13 12:34:37.0Z
From: Data Devices <kiron@datadevicesindia.com>
Newsgroups: Advantage.Xbase++
Subject: Re: Using ADT and DBF at the same time
Date: Sat, 13 Oct 2007 18:04:37 +0530
Message-ID: <mne1h3tbrpqs51ms0uklh4gi6okrdqocl0@4ax.com>
References: <3np0h31hhipvi6r31h7ril9lpo6cj0mlvf@4ax.com> <6c56a9223380a8c9db6bebd70b31@devzone.advantagedatabase.com>
X-Newsreader: Forte Agent 3.2/32.830
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 122.167.53.114
X-Trace: 13 Oct 2007 06:29:27 -0700, 122.167.53.114
Lines: 28
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!122.167.53.114
Xref: solutions.advantagedatabase.com Advantage.Xbase++:826
Article PK: 1140697

Hi,

I am using ADT tables with data dictionary and DBF tables (with .INI
extension) as free tables together

Regards
Kiron


On Sat, 13 Oct 2007 09:51:58 +0000 (UTC), Rodd Graham

<rgraham@grahamautomation.com> wrote:

>Hello Data,
>
>>> So what is the trick to use DBF and ADT at the same time without
>>> using dictionnary?
>>>
>> I think better solution will be "create seperate session for ADT and
>> DBF handling ".
>
>That won't solve the problem. In Xbase++ the ADS table type is a global
>setting for ADSDBE, it is not instanced into the DacSession() class.
>
>Regards,
>
>Rodd Graham, Consultant
>Graham Automation Systems, LLC
>


Edgar Sherman Posted on 2007-10-12 20:25:31.0Z
Date: Fri, 12 Oct 2007 14:25:31 -0600
From: Edgar Sherman <no@email.com>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Newsgroups: Advantage.Xbase++
Subject: Re: Using ADT and DBF at the same time
References: <NBTM6AB221D0@nbautomation.mailtraq> <6c56a922337c68c9daf47dec595a@devzone.advantagedatabase.com>
In-Reply-To: <6c56a922337c68c9daf47dec595a@devzone.advantagedatabase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 10.24.34.133
Message-ID: <470fd703@solutions.advantagedatabase.com>
X-Trace: 12 Oct 2007 14:20:19 -0700, 10.24.34.133
Lines: 70
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.34.133
Xref: solutions.advantagedatabase.com Advantage.Xbase++:823
Article PK: 1140696

I am not proficient in XBase++, so I will defer to Rodd's answers for this.

However the AutoIncrement question I can help to answer.
ADS has an API to retrieve the last autoinc.
AdsGetLastAutoinc
Help file:
http://devzone.advantagedatabase.com/dz/webhelp/Advantage8.1/mergedProjects/ace/ace.htm#api3/adsgetlastautoinc.htm

This should get you what you want, and XBase may have a similar
property/call already.

Edgar Sherman

Rodd Graham wrote:
> Hello Pascal,
>
>> I have many softwares that were written for Clipper in the '90, then
>> converted to XBase++. They all use ADSDBE for their database engine,
>> and all files are .DBF (connected using ADS free connection).
>>
>> I would like to add new functions that use .ADT without using a
>> dictionnary (most of my customers don't have a dictionnary yet).
>
> I am just now starting to attach all of my freetable databases to
> dictionaries. Although ADSDBE has minor defects with dictionaries, the
> benefits of dictionaries are worth it. I have been building a direct
> ACE32 to bypass ADSDBE to overcome these flaws.
>
>>
>> In Alaska documentation for ADSDBE 1.90, I notice this:
>>
>> DbeInfo( COMPONENT_DATA , ADSDBE_TBL_MODE, ADSDBE_ADT ) DbeInfo(
>> COMPONENT_ORDER, ADSDBE_TBL_MODE, ADSDBE_ADT )
>>
>> I fear my application will not work if I add this because it will
>> change all files access.
>
> Have no fear...
>
>>
>> So what is the trick to use DBF and ADT at the same time without using
>> dictionnary?
>
> From the Xbase v1.9 documentation for DBEInfo:
>
> <snip>
> When a DBE is configured, the values are valid for each work area in
> which a file is later opened using this DBE. When a file is opened in a
> work area, an instance of the DBE is created. This is a called a
> database object (DBO) and manages the file open in the work area until
> it is closed. The DBO "inherits" the current configuration of the DBE.
> If the DBE is reconfigured after the opening of a file in the work area,
> these changes are not valid for the files already opened.
> </snip>
>
> Just configure your DBE as desired immediately prior to opening the
> tables. If multithreaded, you need to mutex the configure/open sequence
> since the DBE configuration is global.
>
>> Another question, how do I recover AutoIncrement value?
>
> I have not used the AutoIncrement type, but I would think you just need
> to reread the row after committing it to the table.
>
> Regards,
>
> Rodd Graham, Consultant
> Graham Automation Systems, LLC
>
>


Pascal Boivin Posted on 2007-10-15 15:02:53.0Z
Message-ID: <NBTM6AFB2A36@nbautomation.mailtraq>
To: Advantage.Xbase++
Date: Mon, 15 Oct 2007 11:02:53 -0400
Lines: 11
From: "Pascal Boivin" <pascal.boivin@nbautomation.com>
Subject: Re: Using ADT and DBF at the same time
Newsgroups: Advantage.Xbase++
References: <NBTM6AB221D0@nbautomation.mailtraq>
User-Agent: XanaNews/1.18.1.6
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
NNTP-Posting-Host: 69.70.11.19
X-Trace: 15 Oct 2007 09:14:15 -0700, 69.70.11.19
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!nbautomation.mailtraq!anonymous
Xref: solutions.advantagedatabase.com Advantage.Xbase++:832
Article PK: 1140701

Thanks Everyone

I will change my custom OpenFile function to use appropriate setting
when it detect an ADT file.

--
************************
* Pascal Boivin *
* N.B. Automation inc. *
************************


Pascal Boivin Posted on 2008-01-09 14:33:09.0Z
Message-ID: <NBTM730958D6@nbautomation.mailtraq>
To: Advantage.Xbase++
Date: Wed, 09 Jan 2008 09:33:09 -0500
Lines: 19
From: "Pascal Boivin" <pascal.boivin@nbautomation.com>
Subject: Re: Using ADT and DBF at the same time
Newsgroups: Advantage.Xbase++
References: <NBTM6AB221D0@nbautomation.mailtraq>
User-Agent: XanaNews/1.18.1.6
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
NNTP-Posting-Host: 69.70.11.19
X-Trace: 9 Jan 2008 07:28:30 -0700, 69.70.11.19
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!nbautomation.mailtraq!anonymous
Xref: solutions.advantagedatabase.com Advantage.Xbase++:892
Article PK: 1140748

I'm finally back on this project.

Table type:
I changed my custom "USE" command to set the appropriate DbeInfo
settings every time I open a file. If the filename contains ".ADT"
then I use ADSDBE_ADT else I use ADSDBE_CDX. I had to change a few
other functions and now everything is okay. I don't see speed
degradation by calling DbeInfo everytime.

AutoIncrement field:
Alaska has done a nice job with 1.9. After a DbAppend, the new value
is already in the field! The field type is "S" in xbase.

--
************************
* Pascal Boivin *
* N.B. Automation inc. *
************************