Re: odbc problem
| From: | IMRAN | Date: | Mon, 12 Mar 2007 06:03:33 +0000 |
| Subject: | Re: odbc problem | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-43251@lists.php.net to get a copy of this message | ||
Is odbc_num_fields return any value ?
You can disable the warnings in php.ini file.
Please let me know if that helps...
----- Original Message -----
From: ""bedul"" <landavia81@gmail.com>
Newsgroups: php.db
To: <php-db@lists.php.net>
Sent: Monday, March 12, 2007 10:21 AM
Subject: Fw: odbc problem
>
> ----- Original Message -----
> From: "gunawan" <wibisonog@ramsayhealth.co.id>
> To: <php-db@lists.php.net>
> Sent: Monday, March 12, 2007 11:46 AM
> Subject: odbc problem
>
>
> > i have this warning.. i don't know what the meaning
> > ----------------------------------------
> > Using odbc_num_fields
> >
> > Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché ODBC][State
:
> > S1000][Native Code 400] [C:\ProgramFiles\xampp\apache\bin\apache.exe]
> > General server error, SQL state S1000 in SQLExecDirect in
> > C:\dokumen_php\tes\odbc\c-6.php on line 12
> > ---------------------------------------------
> >
> > this is my script.. i know this is simple..
> > ----------------
> > <h1>Using odbc_num_fields</h1> <?
> >
> > //include "c-config.php";
> > $DBname = 'medtrak2'; //'MSAccessDriver'
> > $DBuser = "_system";
> > $DBpass = "sys";
> >
> > $con = odbc_connect($DBname, $DBuser, $DBPass);
> > if ($con)
> > {
> > $txt.= "odbc connected
> > ";
> > $sql = "select * from PA_Adm";
> > //this function will execute the sql satametn in
> > //correspondance to the table in the db
> > $exec = odbc_exec($con, $sql);
> > //int odbc_num_fields ( resource result_id )
> > $n= odbc_num_fields($exec); //$Query_ID);
> >
> > $txt.="<br>\ntotal column=".$n;
> > }
> >
> > //$txt.= readThisFile($filename);
> >
> > print $txt;
> > ?>
> >
> > -------------------
> >