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.

PHP/DBFCDX

2 posts in PHP Last posting was on 2008-03-20 21:29:14.0Z
Darrell Ortiz Posted on 2008-03-04 17:35:56.0Z
From: "Darrell Ortiz" <darrell.ortiz@cdmsoft.com>
Newsgroups: advantage.PHP
Subject: PHP/DBFCDX
Date: Tue, 4 Mar 2008 11:35:56 -0600
Lines: 23
Organization: CDM Software Solutions
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: 216.23.206.198
Message-ID: <47cd85de@solutions.advantagedatabase.com>
X-Trace: 4 Mar 2008 10:24:46 -0700, 216.23.206.198
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!216.23.206.198
Xref: solutions.advantagedatabase.com Advantage.PHP:873
Article PK: 1135358

Has anyone successfully implemented PHP and DBFCDX? I have a FWH application
installed with ADS 7.1 and I need to implement web access. Can anyone help a
sample of the following?

1) Provide necessary extensions for PHP and instructions how to install

2) Sample Code
A) Confirm connection to ADS server
B) Open DBFCDX table
C) List table fields from table (my current table is over
2,000,000 records so I need the most effecient mechanism)
D) Add new record
E) Replace field value
F) Delete record
G) Search (Seek)
H) Close DBFCDX table

I appreciate your help! I can be contacted at darrell.ortiz@cdmsoft.com if
anyone has any further questions.

Thank you,


Dirk Erickson Posted on 2008-03-20 21:29:14.0Z
Reply-To: "Dirk Erickson" <Dirk.Erickson@iAnywhere.com>
From: "Dirk Erickson" <Dirk.Erickson@extendedsystems.com>
Newsgroups: advantage.PHP
References: <47cd85de@solutions.advantagedatabase.com>
Subject: Re: PHP/DBFCDX
Date: Thu, 20 Mar 2008 15:29:14 -0600
Lines: 70
Organization: Technical Services
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: 10.24.34.119
Message-ID: <47e2d5d7@solutions.advantagedatabase.com>
X-Trace: 20 Mar 2008 15:23:35 -0700, 10.24.34.119
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.34.119
Xref: solutions.advantagedatabase.com Advantage.PHP:875
Article PK: 1135357

Hi Darrell:

Sorry that there was no response until now..

1) You can download the PHP driver install file from the product downloads
area of the DevZone.. Here's a link to it:
http://devzone.advantagedatabase.com/dz/content.aspx?Key=20&Release=2&Product=16&Platform=6
After installing it you'll see an "install notes" section in the
readme.txt file. (It's written for a linux environment, but the steps are
basically the same)

2) We'll try to get a basic PHP sample application posted for you in the
coming weeks..
Meanwhile: The help file has sample code listed with the extension
functions.. Also the Advantage SQL book within the Advantage server help
file has SQL samples
A) To confirm a connection, make sure that a non-zero long-integer
value (connection handle) is returned from the call to ads_connect..
B) PHP is limited to SQL access, so to open a table use ads_exec or
ads_do to prepare & execute and SQL statement such as "select * from table1"
(see help file example).
C) The fields can be listed in the SQL select statement... ads_fetch_*
functions can be used to retrieve record data.
D) Use SQL insert statement to insert a record.
E) Use SQL Update statements to replace a field value.
F) Use SQL Delete statements to delete records
G) Use a WHILE clause in your SQL statement to filter records and a
CONTAINS function within the WHERE clause can be used for Full Text Search
of memo data and the like.
H) ads_free_result may be the closest equivalent to closing a table..
The help file example for it also shows how to use ads_close to close the
connection.

By the way, version 7.1 of Advantage is technically no longer supported, so
I'd recommend that you download and try version 9.0 (or 8.1 at the least).

Hopefully this helps,

Dirk Erickson
Advantage Technical Services

"Darrell Ortiz" <darrell.ortiz@cdmsoft.com> wrote in message
news:47cd85de@solutions.advantagedatabase.com...
> Has anyone successfully implemented PHP and DBFCDX? I have a FWH
> application installed with ADS 7.1 and I need to implement web access. Can
> anyone help a sample of the following?
>
> 1) Provide necessary extensions for PHP and instructions how to install
>
> 2) Sample Code
> A) Confirm connection to ADS server
> B) Open DBFCDX table
> C) List table fields from table (my current table is over
> 2,000,000 records so I need the most effecient mechanism)
> D) Add new record
> E) Replace field value
> F) Delete record
> G) Search (Seek)
> H) Close DBFCDX table
>
> I appreciate your help! I can be contacted at darrell.ortiz@cdmsoft.com if
> anyone has any further questions.
>
> Thank you,
>