RE: [PHP-DB] Connection to AS/400.
Marc, OpenLink's MT ODBC can talk to a local DB2 Connect on Linux, so you are able to use odbc_functions to get to the DB/2 on AS/400 in a fairly straightforward manner. If you run into problems let me know, or open a free support case at http://www.openlinksw.com/support/suppindx.htm Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access & Data Integration Technology Providers > -Original Message- > From: Marc Grober [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 08, 2001 1:46 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Connection to AS/400. > > > I was wrestling with this for a while. > There is a db2 distribution for linux from IBM > There was some extensive discussion on the list in February > and March of this past year, including a set of files from > Alessandro Grigiante and compiling php with --with-ibm-db2= > (i.e. using db2 instead of odbc, though some may argue thats out > of the frying pan and into the fire?) > I ended up putting our project on hold for a bit (as I think did Zvi) > but I would be very interested to hear any details concerning > use of odbc or ibm-db2 to talk to db2-400 > > Andrew Hill wrote: > > > You still need a driver for PHP to use > > with the Driver Manager, however, and there is not currently an > ODBC driver > > that will talk to AS/400 directly. > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Connection to AS/400.
I was wrestling with this for a while. There is a db2 distribution for linux from IBM There was some extensive discussion on the list in February and March of this past year, including a set of files from Alessandro Grigiante and compiling php with --with-ibm-db2= (i.e. using db2 instead of odbc, though some may argue thats out of the frying pan and into the fire?) I ended up putting our project on hold for a bit (as I think did Zvi) but I would be very interested to hear any details concerning use of odbc or ibm-db2 to talk to db2-400 Andrew Hill wrote: > You still need a driver for PHP to use > with the Driver Manager, however, and there is not currently an ODBC driver > that will talk to AS/400 directly. > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] *.xls
Hi, > Does anyone know some lib for generating excel files. For which database? In MySQL you could do a LOAD DATA OUTFILE file.xls. Johannes -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Problems with PHP / Progress / ODBC
Hi, You may wish to try OpenLink's ODBC drivers, available at http://www.openlinksw.com/. We have excellent support for Progress databases. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access & Data Integration Technology Providers > -Original Message- > From: indrek siitan [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 08, 2001 11:08 AM > To: Mark Newnham; [EMAIL PROTECTED] > Subject: RE: [PHP-DB] Problems with PHP / Progress / ODBC > > > Hi, > > > Progress databases prefer the odbc_prepare, odbc_execute sequence > > over the odbc_exec functions ( I don't know why ) > > ok, changed the code to following: > > --- 8< --- > > $sth=odbc_prepare($DBH,"SELECT Trkoodi,Trnimi FROM Turyhma WHERE > Trkoodi<103000"); > if (odbc_execute($sth)) > { > while(odbc_fetch_row($sth)) > { > echo " " . odbc_result($sth,"Trkoodi") . " - " . > odbc_result($sth,"Trnimi"); > } > } > else > { > echo "execute failed."; > } > > --- 8< --- > > still no good. odbc_execute() is successful, but the while > odbc_fetch_row() falls into infinite loop until it reaches > the PHP script max execution time. then i'll get a pageful > of lines with " -" (the odbc_result() call won't return > anything) > > > Rgds, > Tfr > > --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Problems with PHP / Progress / ODBC
Hi, > Progress databases prefer the odbc_prepare, odbc_execute sequence > over the odbc_exec functions ( I don't know why ) ok, changed the code to following: --- 8< --- " . odbc_result($sth,"Trkoodi") . " - " . odbc_result($sth,"Trnimi"); } } else { echo "execute failed."; } --- 8< --- still no good. odbc_execute() is successful, but the while odbc_fetch_row() falls into infinite loop until it reaches the PHP script max execution time. then i'll get a pageful of lines with " -" (the odbc_result() call won't return anything) Rgds, Tfr --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Fwd: URGENT : How can i generate scripts of database
mysqldump might be difficult though if you don't have telnet access to your mysql.database, but if you only have php access. whats the best thing to do in that case? has anyone tried the exporting options of myphpadmin? > -Original Message- > From: Michael Geier [mailto:[EMAIL PROTECTED]] > Sent: Dienstag, 8. Mai 2001 16:36 > To: Gabriel; [EMAIL PROTECTED] > Subject: RE: [PHP-DB] Fwd: URGENT : How can i generate scripts of > database > > > man mysqldump > > -Original Message- > From: Gabriel [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 08, 2001 9:27 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Fwd: URGENT : How can i generate scripts of database > > > Anyone can tell me how can i generate the scripts of my database to create > it in another mysql server. > Or better wich other ways i´ve to do it. > > Thanks in advance, > > Gabriel. > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Problems with PHP / Progress / ODBC
Progress databases prefer the odbc_prepare, odbc_execute sequence over the odbc_exec functions ( I don't know why ) > -Original Message- > From: indrek siitan [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 08, 2001 11:38 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: [PHP-DB] Problems with PHP / Progress / ODBC > > > Hi, > > I'm trying to write a PHP app that accesses a Progress database. > > version info: > - Windows 2000 Pro + Apache 1.3.14 > - PHP 4.0.4pl1 (4.0.5 just wouldn't work on my machine) > - Progress 8.3.B > - Merant Progress ODBC drivers v 3.50 > > the ODBC drivers seem to be fine - I made a MS Access database > and linked a bunch of Progress tables in there with Get External > Data / Link tables. I can view/query them just fine. > > now, I tried a simple PHP app: > > --- 8< --- > >$DBH=odbc_connect("mgauto","","",""); > $sth=odbc_exec($DBH,"SELECT Trkoodi,Trnimi FROM Turyhma"); > while(odbc_fetch_row($sth)) > { > echo " ".odbc_result($sth,"Trkoodi")." - > ".odbc_result($sth,"Trnimi"); > } > odbc_close($DBH); > ?> > > --- 8< --- > > The odbc_exec() query seems to be fine (when i do "echo $sth" after > the exec, i get "Resource id #2"). but the odbc_fetch_row() really > acts weird - it always returns true so it ends up in endless loop. > the odbc_result() calls return empty strings. > > I've tried the odbc_connect() with all the possible cursor types, > doesn't help. > > I've tried something like that: > > --- 8< --- > > $i=1; > while(1) > { > if (!odbc_fetch_row($sth,$i)) break; > echo " ".odbc_result($sth,"Trkoodi")." - > ".odbc_result($sth,"Trnimi"); > $i++; > } > > --- 8< --- > > didn't work either. :( > > > as a really stoopid thing, I tried creating an ODBC source for the > Access database I created before (with the Progress tables linked > in via ODBC). now I connected to the Access database via ODBC in > PHP and tried to query the Progress tables linked into the Access. > everything worked fine - I could access all the information in > Progress. > > > any other ideas? > > > Rgds, > Tfr > > --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] SQL Server S1000 Weird Errors
BACKGROUND: I was recently given a task to add a table to a MS SQL Server and a few PHP pages to insert, edit, delete and display records from this table. The site is currently running off an Linux Server with PHP 4.03 and a Windows NT box running MS SQL Server 7.0. The SQL Server is unreachable using MS Tools because it is behind a firewall. PROBLEM: I created a table using the SQL command "CREATE TABLE()" [see source below]. I used MS SQL Manager to generate the SQL Script. I added records later on using "odbc_exec()" and the SQL Command "INSERT" and everything was fine. When I tried to retrieve the records using "SELECT * FROM TableA" [see source below], I got the following error "Warning: SQL Error: [OpenLink][ODBC][Driver]General error, SQL state S1000 in SQLExecDirect in /[php file path]... line 9" I have check the name of the table and it's existence using the following SQL Query "SELECT * FROM sysobject WHERE name = 'TableA'" All other tables that were created by the original developer using the MS Tools can be queried using the same php source. Thanks, John Nunez PHP source (I have removed the error check for display purposes only.) $conn = odbc_connect("db","name","password"); $dbresult = odbc_exec($conn, "SELECT * FROM TableA"); $tbContent = odbc_result_all($dbresult); echo $tbContent; SQL Script CREATE TABLE [dbo].[TableA] ( [taID] [int] IDENTITY (1, 1) NOT NULL , [Title] [varchar] (255) NULL , [Message] [varchar] (5000) NULL , [ImgPath] [varchar] (1000) NULL , [ImgHeight] [int] NULL , [ImgWidth] [int] NULL , [EntryDate] [datetime] NULL , [Display] [varchar] (1) NULL ) ON [PRIMARY] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Fwd: URGENT : How can i generate scripts of database
man mysqldump -Original Message- From: Gabriel [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 08, 2001 9:27 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Fwd: URGENT : How can i generate scripts of database Anyone can tell me how can i generate the scripts of my database to create it in another mysql server. Or better wich other ways i´ve to do it. Thanks in advance, Gabriel. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Fwd: URGENT : How can i generate scripts of database
Read your database documentation. It is usually a dump command, such as mysql-dump, or pgsql-dump. These commands usually write out a script that will recreate the database along with the data. There may be command line switches to get just the script. HTH- Miles At 11:26 AM 5/8/01 -0300, Gabriel wrote: >Anyone can tell me how can i generate the scripts of my database to create >it in another mysql server. >Or better wich other ways i´ve to do it. > >Thanks in advance, > >Gabriel. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Fwd: URGENT : How can i generate scripts of database
Anyone can tell me how can i generate the scripts of my database to create it in another mysql server. Or better wich other ways i´ve to do it. Thanks in advance, Gabriel.
RE: [PHP-DB] *.xls
i'd also be interested in this ... i have some code that will create .csv files for download, whihc is the way i normally do it. Steve > -Original Message- > From: Aivar Annamaa [mailto:[EMAIL PROTECTED]] > Sent: 08 May 2001 13:02 > To: [EMAIL PROTECTED] > Subject: [PHP-DB] *.xls > > > Hi > Does anyone know some lib for generating excel files. > I ask it here because database people could use such thing. > > Aivar Annamaa > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] *.xls
Hi Does anyone know some lib for generating excel files. I ask it here because database people could use such thing. Aivar Annamaa -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Problems with PHP / Progress / ODBC
Hi, I'm trying to write a PHP app that accesses a Progress database. version info: - Windows 2000 Pro + Apache 1.3.14 - PHP 4.0.4pl1 (4.0.5 just wouldn't work on my machine) - Progress 8.3.B - Merant Progress ODBC drivers v 3.50 the ODBC drivers seem to be fine - I made a MS Access database and linked a bunch of Progress tables in there with Get External Data / Link tables. I can view/query them just fine. now, I tried a simple PHP app: --- 8< --- ".odbc_result($sth,"Trkoodi")." - ".odbc_result($sth,"Trnimi"); } odbc_close($DBH); ?> --- 8< --- The odbc_exec() query seems to be fine (when i do "echo $sth" after the exec, i get "Resource id #2"). but the odbc_fetch_row() really acts weird - it always returns true so it ends up in endless loop. the odbc_result() calls return empty strings. I've tried the odbc_connect() with all the possible cursor types, doesn't help. I've tried something like that: --- 8< --- $i=1; while(1) { if (!odbc_fetch_row($sth,$i)) break; echo " ".odbc_result($sth,"Trkoodi")." - ".odbc_result($sth,"Trnimi"); $i++; } --- 8< --- didn't work either. :( as a really stoopid thing, I tried creating an ODBC source for the Access database I created before (with the Progress tables linked in via ODBC). now I connected to the Access database via ODBC in PHP and tried to query the Progress tables linked into the Access. everything worked fine - I could access all the information in Progress. any other ideas? Rgds, Tfr --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Informix DELETE problem
Hi all, I've recently encountered the following problem. When I try to DELETE from the Informix database using PHP I receive the following error: Execute immediate fails : DELETE FROM table01 WHERE id=5 (E [SQLSTATE=IX 000 SQLCODE=-668] The same SQL statement used directly in dbaccess works fine/user used is the same. Other queries (like SELECT,etc.) work fine. Any idea where the problem can be? The PHP code follows: \n"; ifx_close($conn_id); ?> Thanks for your thoughts, -Mtx7- -- mail.pt - Um mail para todos - em http://mail.pt/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]