473,556 Members | 2,506 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Connect to DB2 database through PHP WITHOUT ODBC ?

Hi,
is it possible to connect to a DB2 database through PHP WITHOUT ODBC like in MySQL?

Example MySQL:

// Open the database connection and use the sample
// database
$connection = mysql_connect(" localhost","use r1","xxxx");
mysql_select_db ("sample", $connection);

Best regards
Markus
Nov 12 '05 #1
3 3842
Ian
Markus Keuthmann wrote:
Hi,
is it possible to connect to a DB2 database through PHP WITHOUT ODBC like in MySQL?

Example MySQL:

// Open the database connection and use the sample
// database
$connection = mysql_connect(" localhost","use r1","xxxx");
mysql_select_db ("sample", $connection);

Best regards
Markus


Although the PHP interface to DB2 uses the unified odbc_* functions,
my understanding is that they are coded to use DB2 CLI.

They do *not* require an ODBC driver manager to function properly.


Nov 12 '05 #2
Markus Keuthmann wrote:
Hi,
is it possible to connect to a DB2 database through PHP WITHOUT ODBC like in MySQL?

Example MySQL:

// Open the database connection and use the sample
// database
$connection = mysql_connect(" localhost","use r1","xxxx");
mysql_select_db ("sample", $connection);

Best regards
Markus


Check developerWorks tomorrow for an article (by yours truly) that
describes how to compile the Unified ODBC extension directly against the
DB2 CLI libraries. It's "ODBC" in name only at that point.

Dan
Nov 12 '05 #3
Dan Scott wrote:
Markus Keuthmann wrote:
Hi,
is it possible to connect to a DB2 database through PHP WITHOUT ODBC
like in MySQL?

Example MySQL:
// Open the database connection and use the sample
// database
$connection = mysql_connect(" localhost","use r1","xxxx");
mysql_select_db ("sample", $connection);

Best regards
Markus

Check developerWorks tomorrow for an article (by yours truly) that
describes how to compile the Unified ODBC extension directly against the
DB2 CLI libraries. It's "ODBC" in name only at that point.

Dan


Update: The article is now available at
http://www.ibm.com/developerworks/db.../dm-0502scott/

Dan
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
4785
by: Mr Dygi | last post by:
Hi, PHP 4.3.4 installed manually from package *.zip and Apache 2. I have a problem with this simple code: <?php $link = mysql_connect("127.0.0.1","","") or die("Could not connect: " . mysql_error()); echo "Connected successfully"; mysql_close($link);
7
2198
by: Thomas Scheiderich | last post by:
I have a page that is trying to connect to my SQL Database. All the code I have seen shows me to connect the same way. The error I am getting says: Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) Data source name not found and no default driver specified /connectDB.asp, line 13
3
6053
by: Lee | last post by:
Hi, I'm developing a socket program to connect to Informix database through the ODBC. In here i called my socket program as "tap" . My tap will listen for data from unix through port 1070. After checking of the data, tap will then insert the data to the informix database. I know we can point the tap to one specified port in Informix database...
1
3661
by: Rick Hickerson | last post by:
I can't get PHP to connect to DB2 on the same server. I'm running both Apache/PHP and DB2 on Mandrake Linux 9.2. I didn't compile PHP; just installed what appear to be the appropriate RPMs (I don't like to compile/install and ruin RPM dependencies; I've seen the documents which say to build PHP "--with-ibm-db2=/home/db2inst1/sqllib"): ...
3
5730
by: Fabian Knopf | last post by:
Hi friends, i have a unix machine PC1 where a database is running ( IBM DB2 V8.1 ) . Then i have another machine PC2 i installed there also ( IBM DB2 V8.1 ). On PC2 i installed unixODBC. To connect to the database over ODBC on unix i did this: on db2 console: catalog tcpip node archiv remote PC1 server DB2_db2inst1
4
19832
by: RLN | last post by:
I have an Access2002 database that needs to connect to an Oracle Database. I connected to my Oracle DB in a simple VB6 app using no ODBC data source. How do I do the same thing using VBA in Access? Below is the code I used in the VB app to connect to the Oracle database, and I just can't seem to get it translated to ADO in Access/VBA. ...
5
4554
by: news.telia.net | last post by:
Hi! I have a question. I have installed php and mysql on an apache-server on windows and I can't connect to the server. I tried to create a database (since I am trying to learn howto). My manual said I should write this at the shell: c:\mysql\bin>mysqladmin -u root creare mindb I did this and got this error:
1
17566
by: Thijs | last post by:
Hi, i'm new to db2, so the answer on this question is maybe verry simple (or not)... i've installed db2 on a server, and now, I want to make a connection with odbc from a client (windows 2000). I installed the IBM DB2 odbc driver.
1
2182
by: JustMe | last post by:
Hi all, Although I've got quite a lot of experience with php and (M/My)SQL, I only used both within an online php script. These last few months I bought an option with my webhost to access the remote database via ODBC via my homePC. I use MS Access (linked tables) on my PC, just because it's very easy to make new reports / forms /...
0
7624
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7547
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7828
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7589
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6178
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5452
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3576
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2040
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
865
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.