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.

Double entries when using adsconsole

3 posts in Linux Last posting was on 2008-02-05 21:22:28.0Z
Georg Künzel Posted on 2008-01-30 16:35:05.0Z
From: =?iso-8859-1?q?Georg_K=FCnzel?= <georg@kedo.com>
Subject: Double entries when using adsconsole
Newsgroups: Advantage.Linux
User-Agent: Pan/0.129 (Benson & Hedges Moscow Gold)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 213.39.210.64
Message-ID: <47a0a739@solutions.advantagedatabase.com>
Date: 30 Jan 2008 09:35:05 -0700
X-Trace: 30 Jan 2008 09:35:05 -0700, 213.39.210.64
Lines: 67
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!213.39.210.64
Xref: solutions.advantagedatabase.com Advantage.Linux:1095
Article PK: 1130826

Hi,

I encountered another problem while testing ADS on Linux.
If i insert data with adsconsole, i get double entries like this:


georg@georg-latitude:~/ads/adsconsole$ ls -l /ecos
insgesamt 0

georg@georg-latitude:~/ads/adsconsole$ cat test.sql
CREATE TABLE adressen (name CHAR(50), vorname CHAR(50));

georg@georg-latitude:~/ads/adsconsole$ sudo ./adsconsole -connectpath:/
ecos/ -script:/home/georg/ads/adsconsole/test.sql

30.01.2008 17:28:31: connection to /ecos/ successful
30.01.2008 17:28:31: run script
30.01.2008 17:28:31: Exception:
Error 7200: AQE Error: State = S0000; NativeError = 2010; [Extended
Systems][Advantage SQL Engine][ISAM]ISAM table already exists

Funny - data directory was empty, a table is written, seems as "someone"
tries to execute this script twice.....

georg@georg-latitude:~/ads/adsconsole$ cat test1.sql
INSERT INTO adressen VALUES ('K??nzel','Georg');

georg@georg-latitude:~/ads/adsconsole$ sudo ./adsconsole -connectpath:/
ecos/ -script:/home/georg/ads/adsconsole/test1.sql

30.01.2008 17:32:32: connection to /ecos/ successful
30.01.2008 17:32:32: run script
30.01.2008 17:32:32: script execution successful
30.01.2008 17:32:32: ...finished

georg@georg-latitude:~/ads/adsconsole$ cat test2.sql
SELECT * FROM adressen;

georg@georg-latitude:~/ads/adsconsole$ sudo ./adsconsole -connectpath:/
ecos/ -script:/home/georg/ads/adsconsole/test2.sql



30.01.2008 17:33:49: connection to /ecos/ successful
30.01.2008 17:33:49: run script
30.01.2008 17:33:49: result:

[name] [vorname]
K??nzel Georg
K??nzel Georg

30.01.2008 17:33:49: ...finished


Et voila - two entries! I've executed every script only once. Deleted the
table and tried it again - same problem. A "ps aux" shows only one adsd
running. As I posted a few minutes ago my system is Ubuntu 7.10, ads 8.10.
adsconsole -help doesn't show detailed versioning infos, only Copyright
2006.

Any ideas ?

Regards
Georg


Peter Rosario Posted on 2008-02-05 17:28:29.0Z
From: Peter Rosario <prosario@aibonline.org>
Subject: Re: Double entries when using adsconsole
Date: Tue, 05 Feb 2008 11:28:29 -0600
User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
Message-ID: <pan.2008.02.05.17.28.29.936283@aibonline.org>
Newsgroups: Advantage.Linux
References: <47a0a739@solutions.advantagedatabase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 64.6.140.2
X-Trace: 5 Feb 2008 10:24:59 -0700, 64.6.140.2
Lines: 13
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!64.6.140.2
Xref: solutions.advantagedatabase.com Advantage.Linux:1099
Article PK: 1130830

Georg:

I have seen the source code and I know why it does this.

If an exception is raised, the handler reruns the query. It is poorly
coded. It assumes every SQL statement is a SELECT. When it isn't, an
exception is raised resulting in a double execution. When it is a SELECT
statement, no exception is raised therefore the statement is only executed
once.

With Joachim's permission, I can send you the source code.

Pete Rosario


Joachim Duerr (ADS) Posted on 2008-02-05 21:22:28.0Z
From: "Joachim Duerr (ADS)" <jojo.duerr@gmx.de>
Subject: Re: Double entries when using adsconsole
Newsgroups: Advantage.Linux
References: <47a0a739@solutions.advantagedatabase.com> <pan.2008.02.05.17.28.29.936283@aibonline.org>
Organization: iAnywhere
User-Agent: XanaNews/1.18.1.9
X-Face: ,QMv7[luB)BpWAQ~:"kw6n%0ieY63.:g2K3n~8ky0;||5Xle*Xq+=~<Fy:0CVC2nx@8~vZ
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
NNTP-Posting-Host: 77.190.79.92
Message-ID: <47a8d394@solutions.advantagedatabase.com>
Date: 5 Feb 2008 14:22:28 -0700
X-Trace: 5 Feb 2008 14:22:28 -0700, 77.190.79.92
Lines: 13
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!77.190.79.92
Xref: solutions.advantagedatabase.com Advantage.Linux:1101
Article PK: 1130832


Peter Rosario wrote in <pan.2008.02.05.17.28.29.936283@aibonline.org>:

> With Joachim's permission, I can send you the source code.

sure. It's no secret. I've written this utility since I needed
something to test connections and queries in various environments. I've
found it useful and therefore published it.

--
Joachim Duerr
System Consultant (Advantage Database Server)
Sybase iAnywhere
advantagesupport[AT]ianywhere.com