Get physical data path in ADS

12. Mai 2014 at 15:36

Some server management function in Advantage Database Server require the physical file name of the table including the local path. One example could be to get all users of a specific table so you can disconnect them if you require exclusive table access for table maintenance. Unfortunately there’s nothing built into the server. Calling the function database() in SQL just returns the connection path from the client and not the server path.

Insert Only

12. Mai 2014 at 15:35

I’m currently attending the online lecture ‚in memory computing‘ by http://openhpi.com. One of the founders of SAP, Hasso Plattner, stated that they use insert only approach to keep a history of the record in the table. Since only ~10% of the records get updated during lifetime, there should be no performance penalty being expected.

I was very curious if this is possible with ADS aswell and implemented it using triggers.

Load CSV files into Advantage

12. Mai 2014 at 15:30

Recently there has been a posting in the Advantage newsgroups (http://devzone.advantagedatabase.com/forum/questions/2339/any-similar-command-with-mysql-load-command-in-ads) that inspired me to write this blog post. A user asked on how he could load from a text file.

Get Advantage Versions in Delphi

12. Mai 2014 at 15:21

Inspired by a question in the Advantage Database Forum I’ve extracted some functions from the Advantage Delphi Client Kit to get the version numbers.

German Soundex „Kölner Phonetik“ SQL implementation

12. Mai 2014 at 15:16

To all my english fellows: Since the topic discussed in this article is for the german language only I’ll post it in german language. Sorry.

Zur Ähnlichkeitssuche von Zeichenketten existieren mehrere Verfahren. Das bekannteste ist wohl Soundex, welches unter anderem auch im Advantage Database Server als Funktion implementiert ist (Online-Hilfe in der Advantage Devzone). Ein weiteres Verfahren wäre die Distanz (zB Levenstein-Distanz) zwischen zwei Zeichenketten zu messen, um so eine Ähnlichkeit festzustellen. Beide Verfahren sind aber für die deutsche Sprache wenig geeignet: Soundex ist für englisch optimiert, Levenstein würde zwei so unterschiedlich klingende Worte wie „Tier“ und „Tor“ als 2 angeben, was quasi einer Übereinstimmung entspricht.
Bereits 1969 veröffentlichte Hans Joachim Postel die „Kölner Phonetik“.

Automatically load 32 or 64 Bit Advantage Extended Procedures

12. Mai 2014 at 14:19

With the release of Advantage Database Server 10 back in 2010 the API for 64Bit clients was added. The latest patches (10.10.0.28) now also supports Delphi XE2 and with that Delphi developers can write Advantage Extended Procedures (AEP) for 64Bit Servers aswell.

Adjusting Table Structure using SQL

12. Mai 2014 at 14:12

I was asked by a partner how he could adjust his table structure. He needed to check if a char field is available and adjust its size to a minimum of 40 characters. So I came up with this script:

Connecting a TAdsConnection Component using a connection string

12. Mai 2014 at 14:10

The Advantage client Engine 10.1 introduced new API calls. One of them, AdsConnect101, can connect to a database using a connection string rather than setting the connection options one by one.

UNSIGNED32 AdsConnect101(
  UNSIGNED8 *pucConnectString, 
  ADSHANDLE *phConnectOptions,
  ADSHANDLE *phConnect);

TAdsConnection is able to hook into such a connection, either by setting the ConnectionHandle (TAdsConnection.SetHandle) or by creating a new component based on that ConnectionHandle (TAdsConnection.CreateWithHandle, TAdsConnection.CreateFromHandle).