Edit report at http://bugs.php.net/bug.php?id=50623&edit=1
ID: 50623
Comment by: rony_tobins at hotmail dot com
Reported by: bpelletier at alct dot ca
Summary: odbc_field_name
Status: Open
Type: Bug
Package: ODBC related
Operating System: Windows XP Pro
PHP Version: 5.3.1
New Comment:
why not bump up char name[32]; to char name[256]; in
php_odbc_includes.h?
Previous Comments:
------------------------------------------------------------------------
[2009-12-31 14:42:09] bpelletier at alct dot ca
Description:
------------
I use odbc_connect to connect to my sql server 2005.
When I want a column where the field name longer than 31 characters,
odbc_result cuts the name to 31 characters.
I really need to know how to overrite the struct to have the
possibilities to have at least 64 characters.
Thanks for you help.
I see many bugs reporting the same but no solution are proposes.
Reproduce code:
---------------
$requete= "SELECT * FROM Usagers WHERE NomUsager = '" . $p_nomUsager .
"';";
$resultat= ExecuterRequete($requete);
ProchainEnregistrement($resultat);
for ($i=1; $i < odbc_num_fields($resultat) + 1; $i++)
echo odbc_field_name($resultat, $i)." - ";
function ExecuterRequete($p_requete)
{
return odbc_exec($_SESSION['BDConnection'], $p_requete);
}
function ProchainEnregistrement($p_resultat)
{
return odbc_fetch_row($p_resultat);
}
Expected result:
----------------
I want the full name of the fields.
Actual result:
--------------
NomUsager - NoEmployeALCT - UsagerActif - DerniereLangueUtiliseUsager -
MotDePasseUsager - AccesProgrammeGestionALCT -
AccesProgrammeInternational - AccesProgrammeFacturation -
AccesGestionALCTConsulterEmploy - AccesGestionALCTAjouterEmploye -
AccesGestionALCTModifierEmploye - AccesGestionALCTSupprimerEmploy -
AccesGestionALCTConsulterRappor - AccesInternationalConsulterClie -
AccesInternationalAjouterClient - AccesInternationalModifierClien -
AccesInternationalSupprimerClie - AccesInternationalConsulterCont -
AccesInternationalAjouterContac - AccesInternationalModifierConta -
AccesInternationalSupprimerCont - AccesInternationalConsulterProd -
AccesInternationalAjouterProdui - AccesInternationalModifierProdu -
AccesInternationalSupprimerProd - AccesInternationalConsulterCour -
AccesInternationalAjouterCourti - AccesInternationalModifierCourt -
AccesInternationalSupprimerCour - AccesInternationalConsulterComp -
AccesInternationalAjouterCompte - AccesInternationalModifierCompt -
AccesInternationalSupprimerComp - AccesInternationalConsulterTran -
AccesInternationalAjouterTransp - AccesInternationalModifierTrans -
AccesInternationalSupprimerTran - AccesInternationalConsulterCont -
AccesInternationalAjouterContac - AccesInternationalModifierConta -
AccesInternationalSupprimerCont - AccesInternationalConsulterProv -
AccesInternationalAjouterProvin - AccesInternationalModifierProvi -
AccesInternationalSupprimerProv - AccesInternationalConsulterRapp -
AccesInternationalConsulterSoum - AccesInternationalAjouterSoumis -
AccesInternationalModifierSoumi - AccesInternationalSupprimerSoum -
AccesInternationalConsulterDema - AccesInternationalAjouterDemand -
AccesInternationalModifierDeman - AccesInternationalSupprimerDema -
AccesInternationalReviserDemand - AccesConfiguration - UsagerAjoutPar -
UsagerDateAjout - UsagerDerniereMiseAJourPar - UsagerDerniereMiseAJour
-
Warning: odbc_result() [function.odbc-result]: Field
AccesGestionALCTSupprimerEmploye not found in
C:\wamp\www\FIK_CE\Fonctions_PHP\Utilitaires.php on line 79
Warning: odbc_result() [function.odbc-result]: Field
AccesGestionALCTConsulterEmploye not found in
C:\wamp\www\FIK_CE\Fonctions_PHP\Utilitaires.php on line 79
Warning: odbc_result() [function.odbc-result]: Field
AccesGestionALCTConsulterRapport not found in
C:\wamp\www\FIK_CE\Fonctions_PHP\Utilitaires.php on line 79
Warning: odbc_result() [function.odbc-result]: Field
AccesInternationalModifierClient not found in
C:\wamp\www\FIK_CE\Fonctions_PHP\Utilitaires.php on line 79
Warning: odbc_result() [function.odbc-result]: Field
AccesInternationalSupprimerClient not found in
C:\wamp\www\FIK_CE\Fonctions_PHP\Utilitaires.php on line 79
Warning: odbc_result() [function.odbc-result]: Field
AccesInternationalConsulterClient not found in
C:\wamp\www\FIK_CE\Fonctions_PHP\Utilitaires.php on line 79
Warning: odbc_result() [function.odbc-result]: Field
AccesInternationalAjouterContactClient not found in
C:\wamp\www\FIK_CE\Fonctions_PHP\Utilitaires.php on line 79
...............
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=50623&edit=1