RE: [PHP-DB] ODBC Problem
this sounds a little bit like a wrong charset. I don't know which one your database or your php is running on, but, for a start, play with this: - charset of the file: If you open your file in an editor that allows storing it as different kinds of charsets, try saving it as something else. It's probably ANSI, try UTF-8 or Unicode. - charset of delivery: If your request ends in one or the other form of html, remember to put in a content type, like this: meta http-equiv=Content-Type content=text/html; charset=?php echo $charset; ? again, play around with the variable $charset, or, instead, hardcode it in the way you need it. I'm not sure about this, but maybe you can change the same thing by changing the character encoding in your browser manually and not putting in any content-type. Once you've found what you need, put it in as meta tag. Cheers, Matthias -Original Message- From: Rodrigo Haces [mailto:[EMAIL PROTECTED] Sent: 10 October 2005 23:13 To: php-db@lists.php.net Subject: [PHP-DB] ODBC Problem Hi all: Im currently using php to connect to a database in another server, this is a intersystems cache database. if i do a query to my database and the result has special spanish characters like ´ (á,é,í,ó,ú) it returns me another character, this one changes from time to time, i just tried to make a test with the isql shell program, i connect and ask for the same query and in shell it returns the correct characters. If someone can help me please i'll apretiate. Thanks rodrigo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] ODBC Problem
Good morning, I have almost the same problem, but just with cirilic characters. I have this state on every page, html and php: meta http-equiv=Content-Type content=text/html; charset=utf-8 if I try to show cirilic characters I don't have problems. If I try to insert names in cirilic then I have problems with some characters only. If I insert the names in latin characters I don't have anykind of problems. I have tried with phpMyAdmin interface. I can insert cirilic characters without problems, but if later I take this datas to my web site I obtain just . And if I read the cirilic characters I have introduced by the website there is no sense. I have tried changing the charset on both, database and website, without results. I have changed from POST to GET without fine result. Maybe an Apache problem? I am testing it right now. Lost, just lost. Kind regards, Serafin Matthias Willerich wrote: this sounds a little bit like a wrong charset. I don't know which one your database or your php is running on, but, for a start, play with this: - charset of the file: If you open your file in an editor that allows storing it as different kinds of charsets, try saving it as something else. It's probably ANSI, try UTF-8 or Unicode. - charset of delivery: If your request ends in one or the other form of html, remember to put in a content type, like this: meta http-equiv=Content-Type content=text/html; charset=?php echo $charset; ? again, play around with the variable $charset, or, instead, hardcode it in the way you need it. I'm not sure about this, but maybe you can change the same thing by changing the character encoding in your browser manually and not putting in any content-type. Once you've found what you need, put it in as meta tag. Cheers, Matthias -Original Message- From: Rodrigo Haces [mailto:[EMAIL PROTECTED] Sent: 10 October 2005 23:13 To: php-db@lists.php.net Subject: [PHP-DB] ODBC Problem Hi all: Im currently using php to connect to a database in another server, this is a intersystems cache database. if i do a query to my database and the result has special spanish characters like ´ (á,é,í,ó,ú) it returns me another character, this one changes from time to time, i just tried to make a test with the isql shell program, i connect and ask for the same query and in shell it returns the correct characters. If someone can help me please i'll apretiate. Thanks rodrigo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] ODBC Problem
Hi all: Im currently using php to connect to a database in another server, this is a intersystems cache database. if i do a query to my database and the result has special spanish characters like ´ (á,é,í,ó,ú) it returns me another character, this one changes from time to time, i just tried to make a test with the isql shell program, i connect and ask for the same query and in shell it returns the correct characters. If someone can help me please i'll apretiate. Thanks rodrigo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] ODBC problem
Hi. I have a problem, Been writing a site in php that uses ODBC systemlink to a Access DB The server is apache The problem is that the final server is win2000 IIS and the thing doesent work. It seems that the odbc connect doesent output any info. It works fine on apache cant figure out what the difference is. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] ODBC problem in 4.2.0
Hi Ryan, It's not true that this can happen to any product. PHP is a fantastic language, but there are well-known ways to manage QA. All it needs is to include ODBC in the standard php regression test suite (and run the suite regularly!) Regards, John Ryan Jameson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... BTW... I'd just like to point out that this kind of thing is bound to happen no matter what product you use. I'm certain the PHP guys will have this solved in no time and I'd bet even they would recommend a commercial hosting service be willing and able to step back if a problem like this occurs. This is, however, just an opinion. -Original Message- From: Ryan Jameson (USA) Sent: Monday, April 29, 2002 8:14 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] ODBC problem in 4.2.0 I'd recommend finding a hosting service that would be more careful about making upgrades. There seems to be some problems with ODBC in 4.2 and I have yet to hear of a work around, especially not one you can implement if you don't handle your own server. I feel your pain man! Fortunately for me I can just stay at 4.1.1 until there's a release that works. Ryan -Original Message- From: Mihai Tache [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 7:11 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] ODBC problem in 4.2.0 i work on a website that runs on php with MSSQL through ODBC. until 4.2.0 everything was ok. but my hosting provider just upgraded to 4.2.0 the error message i get is : SQL error: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt, SQL state S1000 in SQLExecDirect in take the folowing code for example : ? $res=odbc_exec($conn,select * from ...); for($i=1;odbc_fetch_row($res);$i++) { $res2=odbc_exec($conn,select * from ); ... } ? the first odbc query runs OK but i get the error at the second one and ONLY if the first one returned more than one row. i even tried with 2 ODBC connections but doesn't work MS has something to say about this at http://support.microsoft.com/default.aspx?scid=kb;EN-US;q143032 don't know if that is really the problem or not. i don't know how i can set ODBC (from php) to be synchronous anyway. the fact is that the same scripts worked fine 6h ago on 4.1.1 and 4.0.6 (both on win32). i'd go back to 4.1.1 but i'm forced to work with 4.2.0 as i said is there something i can do except wait for 4.2.1 ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] ODBC problem in 4.2.0
Hello, John Lim wrote: Hi Ryan, It's not true that this can happen to any product. PHP is a fantastic language, but there are well-known ways to manage QA. All it needs is to include ODBC in the standard php regression test suite (and run the suite regularly!) This is not the case of a bug but rather an intentional and documented backwards incompatible change of odbc_fecth_row function. I think that is very unprofessional from the PHP developers that did it and approve it and it is not the first time they do it with this and other PHP function. Unfortunately there is an odd conception of them that if you break backwards compatibility and document it that is ok, which I completely disagree, especially because this was not a X.0 version. Unlike with a real company, since there is no commercial harm for the PHP developers responsible for breaking backwards compatibility it is pointless to complain about lack of professionalism of the responsible PHP developers, as it was demonstrated in the episodes when they broke functions that worked consistently for 4 years like dirname and strtok. The only way to solve people's problem with these functions is use PHP code that uses conditional programming based on the PHP version that is running. Regards, Manuel Lemos Regards, John Ryan Jameson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... BTW... I'd just like to point out that this kind of thing is bound to happen no matter what product you use. I'm certain the PHP guys will have this solved in no time and I'd bet even they would recommend a commercial hosting service be willing and able to step back if a problem like this occurs. This is, however, just an opinion. -Original Message- From: Ryan Jameson (USA) Sent: Monday, April 29, 2002 8:14 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] ODBC problem in 4.2.0 I'd recommend finding a hosting service that would be more careful about making upgrades. There seems to be some problems with ODBC in 4.2 and I have yet to hear of a work around, especially not one you can implement if you don't handle your own server. I feel your pain man! Fortunately for me I can just stay at 4.1.1 until there's a release that works. Ryan -Original Message- From: Mihai Tache [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 7:11 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] ODBC problem in 4.2.0 i work on a website that runs on php with MSSQL through ODBC. until 4.2.0 everything was ok. but my hosting provider just upgraded to 4.2.0 the error message i get is : SQL error: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt, SQL state S1000 in SQLExecDirect in take the folowing code for example : ? $res=odbc_exec($conn,select * from ...); for($i=1;odbc_fetch_row($res);$i++) { $res2=odbc_exec($conn,select * from ); ... } ? the first odbc query runs OK but i get the error at the second one and ONLY if the first one returned more than one row. i even tried with 2 ODBC connections but doesn't work MS has something to say about this at http://support.microsoft.com/default.aspx?scid=kb;EN-US;q143032 don't know if that is really the problem or not. i don't know how i can set ODBC (from php) to be synchronous anyway. the fact is that the same scripts worked fine 6h ago on 4.1.1 and 4.0.6 (both on win32). i'd go back to 4.1.1 but i'm forced to work with 4.2.0 as i said is there something i can do except wait for 4.2.1 ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] ODBC problem in 4.2.0
We will agree to disagree. I've experienced many testers who thought things that you think. They were often the most cocky and least effective of the hundreds I've worked with on projects, and again every product I've worked with from Microsoft to Oracle to Java have had similar issues arise. I think the PHP developers are doing a fine job, even if I do have to skip a release, I've got my money on this being fixed in the next release. Ryan -Original Message- From: John Lim [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 2:50 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] ODBC problem in 4.2.0 Hi Ryan, It's not true that this can happen to any product. PHP is a fantastic language, but there are well-known ways to manage QA. All it needs is to include ODBC in the standard php regression test suite (and run the suite regularly!) Regards, John Ryan Jameson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... BTW... I'd just like to point out that this kind of thing is bound to happen no matter what product you use. I'm certain the PHP guys will have this solved in no time and I'd bet even they would recommend a commercial hosting service be willing and able to step back if a problem like this occurs. This is, however, just an opinion. -Original Message- From: Ryan Jameson (USA) Sent: Monday, April 29, 2002 8:14 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] ODBC problem in 4.2.0 I'd recommend finding a hosting service that would be more careful about making upgrades. There seems to be some problems with ODBC in 4.2 and I have yet to hear of a work around, especially not one you can implement if you don't handle your own server. I feel your pain man! Fortunately for me I can just stay at 4.1.1 until there's a release that works. Ryan -Original Message- From: Mihai Tache [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 7:11 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] ODBC problem in 4.2.0 i work on a website that runs on php with MSSQL through ODBC. until 4.2.0 everything was ok. but my hosting provider just upgraded to 4.2.0 the error message i get is : SQL error: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt, SQL state S1000 in SQLExecDirect in take the folowing code for example : ? $res=odbc_exec($conn,select * from ...); for($i=1;odbc_fetch_row($res);$i++) { $res2=odbc_exec($conn,select * from ); ... } ? the first odbc query runs OK but i get the error at the second one and ONLY if the first one returned more than one row. i even tried with 2 ODBC connections but doesn't work MS has something to say about this at http://support.microsoft.com/default.aspx?scid=kb;EN-US;q143032 don't know if that is really the problem or not. i don't know how i can set ODBC (from php) to be synchronous anyway. the fact is that the same scripts worked fine 6h ago on 4.1.1 and 4.0.6 (both on win32). i'd go back to 4.1.1 but i'm forced to work with 4.2.0 as i said is there something i can do except wait for 4.2.1 ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] ODBC problem in 4.2.0
Hi Ryan, Don't be hasty. What i'm simply saying is that QA is a process and you need to build feedback into the loop. Developers come and go in an Open Source development process and you need to build in regression tests so that when new developers with new ideas come along, they don't break code, or quickly realize what they have done after they have run basic regression tests. I also think that PHP developers are doing a fine job, but I don't think there is anything wrong in pointing out where they can improve, rather than apologize wholesale. Regards, John Ryan Jameson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... We will agree to disagree. I've experienced many testers who thought things that you think. They were often the most cocky and least effective of the hundreds I've worked with on projects, and again every product I've worked with from Microsoft to Oracle to Java have had similar issues arise. I think the PHP developers are doing a fine job, even if I do have to skip a release, I've got my money on this being fixed in the next release. Ryan -Original Message- From: John Lim [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 2:50 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] ODBC problem in 4.2.0 Hi Ryan, It's not true that this can happen to any product. PHP is a fantastic language, but there are well-known ways to manage QA. All it needs is to include ODBC in the standard php regression test suite (and run the suite regularly!) Regards, John Ryan Jameson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... BTW... I'd just like to point out that this kind of thing is bound to happen no matter what product you use. I'm certain the PHP guys will have this solved in no time and I'd bet even they would recommend a commercial hosting service be willing and able to step back if a problem like this occurs. This is, however, just an opinion. -Original Message- From: Ryan Jameson (USA) Sent: Monday, April 29, 2002 8:14 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] ODBC problem in 4.2.0 I'd recommend finding a hosting service that would be more careful about making upgrades. There seems to be some problems with ODBC in 4.2 and I have yet to hear of a work around, especially not one you can implement if you don't handle your own server. I feel your pain man! Fortunately for me I can just stay at 4.1.1 until there's a release that works. Ryan -Original Message- From: Mihai Tache [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 7:11 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] ODBC problem in 4.2.0 i work on a website that runs on php with MSSQL through ODBC. until 4.2.0 everything was ok. but my hosting provider just upgraded to 4.2.0 the error message i get is : SQL error: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt, SQL state S1000 in SQLExecDirect in take the folowing code for example : ? $res=odbc_exec($conn,select * from ...); for($i=1;odbc_fetch_row($res);$i++) { $res2=odbc_exec($conn,select * from ); ... } ? the first odbc query runs OK but i get the error at the second one and ONLY if the first one returned more than one row. i even tried with 2 ODBC connections but doesn't work MS has something to say about this at http://support.microsoft.com/default.aspx?scid=kb;EN-US;q143032 don't know if that is really the problem or not. i don't know how i can set ODBC (from php) to be synchronous anyway. the fact is that the same scripts worked fine 6h ago on 4.1.1 and 4.0.6 (both on win32). i'd go back to 4.1.1 but i'm forced to work with 4.2.0 as i said is there something i can do except wait for 4.2.1 ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] ODBC problem in 4.2.0
i work on a website that runs on php with MSSQL through ODBC. until 4.2.0 everything was ok. but my hosting provider just upgraded to 4.2.0 the error message i get is : SQL error: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt, SQL state S1000 in SQLExecDirect in take the folowing code for example : ? $res=odbc_exec($conn,select * from ...); for($i=1;odbc_fetch_row($res);$i++) { $res2=odbc_exec($conn,select * from ); ... } ? the first odbc query runs OK but i get the error at the second one and ONLY if the first one returned more than one row. i even tried with 2 ODBC connections but doesn't work MS has something to say about this at http://support.microsoft.com/default.aspx?scid=kb;EN-US;q143032 don't know if that is really the problem or not. i don't know how i can set ODBC (from php) to be synchronous anyway. the fact is that the same scripts worked fine 6h ago on 4.1.1 and 4.0.6 (both on win32). i'd go back to 4.1.1 but i'm forced to work with 4.2.0 as i said is there something i can do except wait for 4.2.1 ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] ODBC problem in 4.2.0
I'd recommend finding a hosting service that would be more careful about making upgrades. There seems to be some problems with ODBC in 4.2 and I have yet to hear of a work around, especially not one you can implement if you don't handle your own server. I feel your pain man! Fortunately for me I can just stay at 4.1.1 until there's a release that works. Ryan -Original Message- From: Mihai Tache [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 7:11 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] ODBC problem in 4.2.0 i work on a website that runs on php with MSSQL through ODBC. until 4.2.0 everything was ok. but my hosting provider just upgraded to 4.2.0 the error message i get is : SQL error: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt, SQL state S1000 in SQLExecDirect in take the folowing code for example : ? $res=odbc_exec($conn,select * from ...); for($i=1;odbc_fetch_row($res);$i++) { $res2=odbc_exec($conn,select * from ); ... } ? the first odbc query runs OK but i get the error at the second one and ONLY if the first one returned more than one row. i even tried with 2 ODBC connections but doesn't work MS has something to say about this at http://support.microsoft.com/default.aspx?scid=kb;EN-US;q143032 don't know if that is really the problem or not. i don't know how i can set ODBC (from php) to be synchronous anyway. the fact is that the same scripts worked fine 6h ago on 4.1.1 and 4.0.6 (both on win32). i'd go back to 4.1.1 but i'm forced to work with 4.2.0 as i said is there something i can do except wait for 4.2.1 ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] ODBC problem in 4.2.0
BTW... I'd just like to point out that this kind of thing is bound to happen no matter what product you use. I'm certain the PHP guys will have this solved in no time and I'd bet even they would recommend a commercial hosting service be willing and able to step back if a problem like this occurs. This is, however, just an opinion. -Original Message- From: Ryan Jameson (USA) Sent: Monday, April 29, 2002 8:14 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] ODBC problem in 4.2.0 I'd recommend finding a hosting service that would be more careful about making upgrades. There seems to be some problems with ODBC in 4.2 and I have yet to hear of a work around, especially not one you can implement if you don't handle your own server. I feel your pain man! Fortunately for me I can just stay at 4.1.1 until there's a release that works. Ryan -Original Message- From: Mihai Tache [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 7:11 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] ODBC problem in 4.2.0 i work on a website that runs on php with MSSQL through ODBC. until 4.2.0 everything was ok. but my hosting provider just upgraded to 4.2.0 the error message i get is : SQL error: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt, SQL state S1000 in SQLExecDirect in take the folowing code for example : ? $res=odbc_exec($conn,select * from ...); for($i=1;odbc_fetch_row($res);$i++) { $res2=odbc_exec($conn,select * from ); ... } ? the first odbc query runs OK but i get the error at the second one and ONLY if the first one returned more than one row. i even tried with 2 ODBC connections but doesn't work MS has something to say about this at http://support.microsoft.com/default.aspx?scid=kb;EN-US;q143032 don't know if that is really the problem or not. i don't know how i can set ODBC (from php) to be synchronous anyway. the fact is that the same scripts worked fine 6h ago on 4.1.1 and 4.0.6 (both on win32). i'd go back to 4.1.1 but i'm forced to work with 4.2.0 as i said is there something i can do except wait for 4.2.1 ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] ODBC problem
Hello, We resolved ourselves the problem by changing the ODBC driver. Bye. - Original Message - From: Christine Cameli [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Katell Galard [EMAIL PROTECTED] Sent: Tuesday, December 11, 2001 5:03 PM Subject: [PHP-DB] ODBC problem Hello, I'm accessing DBASE files (*.dbf) through the ODBC API of a PHP 4.6.0 module. I can select information, I can insert information but I can not delete neither update. Here is my code and the associated error messages : $connect_odbc=odbc_connect($Host,,,SQL_CUR_USE_ODBC) or die(Erreur de connexion au serveur); if (!odbc_autocommit($connect_odbc, TRUE)) { echo 'pb auto_commit'; return; } // selection avant $Req_hebd = select * from fichhebd where NOSAL=$Nosal and NOSEM=$Nosem and ANNEE=.substr($Annee,2,2); echo $Req_hebd .'br'; if (!($Res_hebd=odbc_prepare($connect_odbc,$Req_hebd))) { echo 'pb prepare'; } if (!odbc_execute($Res_hebd)) { echo 'pb execute'; } if (!($res=odbc_result_all($Res_hebd))) { echo 'pb result_all'; } - all is OK : the following lines appear : NOSAL NOSEM ANNEE IDRUBRIQUE IDCONTRAT NBMINUTE 22.0 43.0 1.0 RD 593 1230.0 22.0 43.0 1.0 RD 593 2.0 echo brres: . $res; odbc_free_result($Res_hebd); // essai sur update $Req_hebd=UPDATE fichhebd set NBMINUTE=0 WHERE NOSAL=$Nosal and NOSEM=$Nosem and ANNEE=.substr($Annee,2,2); echo $Req_hebd .'br'; $Res_hebd = odbc_exec($connect_odbc,$Req_hebd); PB : the following lines appear : Warning: SQL error: [Microsoft][Pilote ODBC dBase] L'opération doit utiliser une requête qui peut être mise à jour., SQL state S1000 in SQLExecDirect in C:\Inetpub\wwwroot\CRA\Normal\valider.php on line 140 NB : 'L'opération doit utiliser une requête qui peut être mise à jour' means 'it is not possible to make au update request'. echo 'num_row:' . odbc_num_rows($Res_hebd) .'br'; odbc_free_result($Res_hebd); $Req_hebd=DELETE FROM fichhebd WHERE NOSAL=$Nosal and NOSEM=$Nosem and ANNEE=.substr($Annee,2,2); echo $Req_hebd .'br'; $Res_hebd = odbc_exec($connect_odbc,$Req_hebd); PB : the following lines appear : Warning: SQL error: [Microsoft][Pilote ODBC dBase] Impossible de supprimer dans les tables spécifiées., SQL state S1000 in SQLExecDirect in C:\Inetpub\wwwroot\CRA\Normal\valider.php on line 146 NB : ' Impossible de supprimer dans les tables spécifiées' means 'It is not possible to suppress in the specified tables'. echo 'num_row:' . odbc_num_rows($Res_hebd) .'br'; odbc_free_result($Res_hebd); // end of the php script Thank you for helping me. Best regards. --- Christine CAMELI ELIOS Informatique Tél : 02 96 48 51 51 -- 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] ODBC problem
Hello, I'm accessing DBASE files (*.dbf) through the ODBC API of a PHP 4.6.0 module. I can select information, I can insert information but I can not delete neither update. Here is my code and the associated error messages : $connect_odbc=odbc_connect($Host,,,SQL_CUR_USE_ODBC) or die(Erreur de connexion au serveur); if (!odbc_autocommit($connect_odbc, TRUE)) { echo 'pb auto_commit'; return; } // selection avant $Req_hebd = select * from fichhebd where NOSAL=$Nosal and NOSEM=$Nosem and ANNEE=.substr($Annee,2,2); echo $Req_hebd .'br'; if (!($Res_hebd=odbc_prepare($connect_odbc,$Req_hebd))) { echo 'pb prepare'; } if (!odbc_execute($Res_hebd)) { echo 'pb execute'; } if (!($res=odbc_result_all($Res_hebd))) { echo 'pb result_all'; } - all is OK : the following lines appear : NOSAL NOSEM ANNEE IDRUBRIQUE IDCONTRAT NBMINUTE 22.0 43.0 1.0 RD 593 1230.0 22.0 43.0 1.0 RD 593 2.0 echo brres: . $res; odbc_free_result($Res_hebd); // essai sur update $Req_hebd=UPDATE fichhebd set NBMINUTE=0 WHERE NOSAL=$Nosal and NOSEM=$Nosem and ANNEE=.substr($Annee,2,2); echo $Req_hebd .'br'; $Res_hebd = odbc_exec($connect_odbc,$Req_hebd); PB : the following lines appear : Warning: SQL error: [Microsoft][Pilote ODBC dBase] L'opération doit utiliser une requête qui peut être mise à jour., SQL state S1000 in SQLExecDirect in C:\Inetpub\wwwroot\CRA\Normal\valider.php on line 140 NB : 'L'opération doit utiliser une requête qui peut être mise à jour' means 'it is not possible to make au update request'. echo 'num_row:' . odbc_num_rows($Res_hebd) .'br'; odbc_free_result($Res_hebd); $Req_hebd=DELETE FROM fichhebd WHERE NOSAL=$Nosal and NOSEM=$Nosem and ANNEE=.substr($Annee,2,2); echo $Req_hebd .'br'; $Res_hebd = odbc_exec($connect_odbc,$Req_hebd); PB : the following lines appear : Warning: SQL error: [Microsoft][Pilote ODBC dBase] Impossible de supprimer dans les tables spécifiées., SQL state S1000 in SQLExecDirect in C:\Inetpub\wwwroot\CRA\Normal\valider.php on line 146 NB : ' Impossible de supprimer dans les tables spécifiées' means 'It is not possible to suppress in the specified tables'. echo 'num_row:' . odbc_num_rows($Res_hebd) .'br'; odbc_free_result($Res_hebd); // end of the php script Thank you for helping me. Best regards. --- Christine CAMELI ELIOS Informatique Tél : 02 96 48 51 51