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.

FoxPro Databse with UDF in INDEX

4 posts in PHP Last posting was on 2009-02-03 17:05:19.0Z
Ingolf Seltrecht Posted on 2009-02-03 14:15:37.0Z
From: Ingolf Seltrecht <ISELT-SOFT@gmx.de>
Subject: FoxPro Databse with UDF in INDEX
Date: Tue, 03 Feb 2009 15:15:37 +0100
User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
Message-ID: <pan.2009.02.03.14.15.36.910000@gmx.de>
Newsgroups: Advantage.PHP
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 217.6.219.242
X-Trace: 3 Feb 2009 07:10:35 -0700, 217.6.219.242
Lines: 31
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!217.6.219.242
Xref: solutions.advantagedatabase.com Advantage.PHP:950
Article PK: 1135434

Hello,

i've got a database witch use a UDF to create the index.
I can not change the index because an older Clipper Application also use
this Database.
I'm noable to open the database. I get this errormasage:

Warning: SQL error: [iAnywhere Solutions][Advantage SQL][ASA] Error 7200:
AQE Error: State = HY000; NativeError = 3007; [iAnywhere
Solutions][Advantage SQL][ASA] Error 3007: Unsupported function found in
index key expression. Table name: WWSAD, SQL state HY000 in SQLPrepare in
/srv/www/htdocs/test.php on line 54

The Funktion is like this:

function clearnumber(FaxNr)
local i,nummer
nummer:=""
FaxNr:=alltrim(FaxNr)
for i:=1 to len(FaxNr)
zahl:=substr(FaxNr,i,1)
if at(zahl,"1234567890")>0
nummer:=nummer+zahl
endif
next
return nummer

How can i use this database with PHP and ADS.

Ingolf


Joachim Duerr (ADS) Posted on 2009-02-03 15:13:38.0Z
From: "Joachim Duerr (ADS)" <jojo.duerr@gmx.de>
Subject: Re: FoxPro Databse with UDF in INDEX
Newsgroups: Advantage.PHP
References: <pan.2009.02.03.14.15.36.910000@gmx.de>
Date: Tue, 3 Feb 2009 16:13:38 +0100
User-Agent: XanaNews/1.19.1.110
X-Face: u2p+</,mb|Ah!x!/qxX5q0t:O~.<1&JzwNHYhSqcviY{~&|iDc"U.Je1A.ZeHR`d;;y#R
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
NNTP-Posting-Host: 10.56.66.108
Message-ID: <49885f0f@solutions.advantagedatabase.com>
X-Trace: 3 Feb 2009 08:13:19 -0700, 10.56.66.108
Lines: 19
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.56.66.108
Xref: solutions.advantagedatabase.com Advantage.PHP:951
Article PK: 1135435


Ingolf Seltrecht wrote:

>How can i use this database with PHP and ADS.

you can't unless you drop the index.

Just as a side note: You're running PHP ... the UDF is written in
Clipper and ADS is written in C. If ADS would support all kinds of
UDFs, we had to build every runtime available in the market into the
product (Clipper, FoxPro, Visual Objects, Xbase++, ...).

Unfortunately it's currently not possible to use SQL UDFs in index key
expressions - otherwise this could be a workaround.

--
Joachim Duerr
Advantage Presales
Sybase GmbH
please don't reply via email


Ingolf Seltrecht Posted on 2009-02-03 15:46:09.0Z
From: Ingolf Seltrecht <ISELT-SOFT@gmx.de>
Subject: Re: FoxPro Databse with UDF in INDEX
Date: Tue, 03 Feb 2009 16:46:09 +0100
User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
Message-ID: <pan.2009.02.03.15.46.09.650000@gmx.de>
Newsgroups: Advantage.PHP
References: <pan.2009.02.03.14.15.36.910000@gmx.de> <49885f0f@solutions.advantagedatabase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 217.6.219.242
X-Trace: 3 Feb 2009 08:41:10 -0700, 217.6.219.242
Lines: 8
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!217.6.219.242
Xref: solutions.advantagedatabase.com Advantage.PHP:952
Article PK: 1135437

Hello,

is it possible to open the database without an existing index?
My PHP application don't need this index but may other CLipper application.
I can't delete this index.

Ingolf


Ingolf Seltrecht Posted on 2009-02-03 17:05:19.0Z
From: Ingolf Seltrecht <ISELT-SOFT@gmx.de>
Subject: Re: FoxPro Databse with UDF in INDEX
Date: Tue, 03 Feb 2009 18:05:19 +0100
User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
Message-ID: <pan.2009.02.03.17.05.18.730000@gmx.de>
Newsgroups: Advantage.PHP
References: <pan.2009.02.03.14.15.36.910000@gmx.de> <49885f0f@solutions.advantagedatabase.com> <pan.2009.02.03.15.46.09.650000@gmx.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 217.6.219.242
X-Trace: 3 Feb 2009 10:00:22 -0700, 217.6.219.242
Lines: 10
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!217.6.219.242
Xref: solutions.advantagedatabase.com Advantage.PHP:953
Article PK: 1135436

Hi,

i found the solution.
I created a Datadictionary with a table witch has the same name and
path like my database from clipper. Then i copied my clipper database over
the new created database.
Now i can open the database without index.

Ingolf