× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Yes. Open iSeries Navigator and go to this folder:

/usr/local/Zend/Core/etc

Look for the file named:

freetds.conf

Make a copy of the file for backup. Then open the file for editing (I
move it to my desktop and use NotePad). Scroll down to the bottom of the
file. You need to make an entry like this one:

# SQL Server database named MYDATA (Microsoft SQL Server 2000
configuration)
[MYDATA]
host = myserver.mydomain.com
port = 1433
tds version = 8.0

Look at the examples and be sure to use the format appropriate for your
version of SQL Server. Save the configuration file.

The PHP code looks something like this:

$conn = mssql_connect('MYDATA','username','password');
if ($conn) {
mssql_select_db("MYDATA");
$query = "SELECT * FROM MYTABLE";
$result = mssql_query($query);
$row = mssql_fetch_array($result);
<process $row as desired>
}

Hope this helps.
Kelly

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Larry Kleinman
Sent: Friday, September 25, 2009 3:48 PM
To: Web Enabling the AS400 / iSeries
Subject: [WEB400] PHP and microsoft sql server

Is there something special that needs to be done in order to have a PHP
script - running either on Zend or on a non-system i server - talk to
SQL
Server?


Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
203-255-4100

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.