Re: [PHP-DB] Re: odbc problem

2007-03-12 Thread bedul
are u indonesian?
- Original Message -
From: "IMRAN" <[EMAIL PROTECTED]>
To: "bedul" <[EMAIL PROTECTED]>
Cc: "php.db" 
Sent: Monday, March 12, 2007 8:04 PM
Subject: [PHP-DB] Re: odbc problem


> Send me your code, I'll fix it for you...
nooo.. that's would not necesarry.. i think u miss my lastest posting.. it
already solved
the problem not on code but on.. "SQL".

there are more than 300++ field on that table.. and there i should not try
use
"select * from table"
but should describe what i was going to show like
"select patientName from patient"

> - Original Message -
> From: "bedul" <[EMAIL PROTECTED]>
> To: "IMRAN" <[EMAIL PROTECTED]>
> Cc: "php.db" 
> Sent: Monday, March 12, 2007 12:15 PM
> Subject: Re: odbc problem
>
>
>
> - Original Message -
> From: "IMRAN" <[EMAIL PROTECTED]>
> To: ""bedul"" <[EMAIL PROTECTED]>
> Cc: "php.db" 
> Sent: Monday, March 12, 2007 1:03 PM
> Subject: Re: odbc problem
>
>
> > Is odbc_num_fields return any value ?
> > You can disable the warnings in php.ini file.
> >
> > Please let me know if that helps...
> nope.. no value has been return.. but it kind strange
> Using odbc_field_len
> No rows found
> odbc connected
> total column=268
>
> it return the column but not the value inside?? strange??
> the more strange was it should return 300++??
>
> i'm curious about this warning line
> 
> Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché ODBC][State :
> S1000][Native Code 400] [D:\Aplikasi\xampp\apache\bin\apache.exe] General
> server error, SQL state S1000 in SQLExecDirect in
> D:\Aplikasi\xampp\htdocs\tes\odbc\c-4.php on line 11
> ===
> "General server error, SQL "
> any clue anyone.. i believe this the problem begin..
>
> fyi.. i already close after open the database. but nothing good happen.
>
> thx to anyone reply..
>
>
> > - Original Message -
> > From: ""bedul"" <[EMAIL PROTECTED]>
> > Newsgroups: php.db
> > To: 
> > Sent: Monday, March 12, 2007 10:21 AM
> > Subject: Fw: odbc problem
> >
> >
> > >
> > > - Original Message -
> > > From: "gunawan" <[EMAIL PROTECTED]>
> > > To: 
> > > 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..
> > > > 
> > > > Using odbc_num_fields  > > >
> > > > //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.="\ntotal column=".$n;
> > > > }
> > > >
> > > > //$txt.= readThisFile($filename);
> > > >
> > > > print $txt;
> > > > ?>
> > > >
> > > > ---
> > > >
> >
> >
>
> --
> 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] Re: odbc problem

2007-03-12 Thread IMRAN
Send me your code, I'll fix it for you...


- Original Message - 
From: "bedul" <[EMAIL PROTECTED]>
To: "IMRAN" <[EMAIL PROTECTED]>
Cc: "php.db" 
Sent: Monday, March 12, 2007 12:15 PM
Subject: Re: odbc problem



- Original Message -
From: "IMRAN" <[EMAIL PROTECTED]>
To: ""bedul"" <[EMAIL PROTECTED]>
Cc: "php.db" 
Sent: Monday, March 12, 2007 1:03 PM
Subject: Re: odbc problem


> Is odbc_num_fields return any value ?
> You can disable the warnings in php.ini file.
>
> Please let me know if that helps...
nope.. no value has been return.. but it kind strange
Using odbc_field_len
No rows found
odbc connected
total column=268

it return the column but not the value inside?? strange??
the more strange was it should return 300++??

i'm curious about this warning line

Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché ODBC][State :
S1000][Native Code 400] [D:\Aplikasi\xampp\apache\bin\apache.exe] General
server error, SQL state S1000 in SQLExecDirect in
D:\Aplikasi\xampp\htdocs\tes\odbc\c-4.php on line 11
===
"General server error, SQL "
any clue anyone.. i believe this the problem begin..

fyi.. i already close after open the database. but nothing good happen.

thx to anyone reply..


> - Original Message -
> From: ""bedul"" <[EMAIL PROTECTED]>
> Newsgroups: php.db
> To: 
> Sent: Monday, March 12, 2007 10:21 AM
> Subject: Fw: odbc problem
>
>
> >
> > - Original Message -
> > From: "gunawan" <[EMAIL PROTECTED]>
> > To: 
> > 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..
> > > 
> > > Using odbc_num_fields  > >
> > > //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.="\ntotal column=".$n;
> > > }
> > >
> > > //$txt.= readThisFile($filename);
> > >
> > > print $txt;
> > > ?>
> > >
> > > ---
> > >
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Fw: [PHP-DB] Re: odbc problem (update.. SOLVED)

2007-03-12 Thread bedul
>>SELECT PA_PatMas.PAPMI_Name FROM PA_Adm, PA_PatMas where
PAADM_PAPMI_DR=PAPMI_RowId1 and PAADM_ADMNo = "O0002694"

i add something from previous
the problem because i show all table and it make error!!
if i just point what i wanted to show.. is not error..

repair for odbc sql.. (if anyone have account for php-help-chm plz info
this)
the max of row odbc can show was "268", more than that.. u will receive
error like
Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché
ODBC][State:S1000]


- Original Message -
From: "Haydar Tuna" <[EMAIL PROTECTED]>
To: 
Sent: Monday, March 12, 2007 2:53 PM
Subject: [PHP-DB] Re: odbc problem


> Hello,
>   I faced same problems. My table had many rows but I couldn't run
> odbc_num_fields. It return -1 result. I looked PHP help file. But I get
rows
> with odbc_fetch_row() function. My operating system was Windows 2003. I
> think, there is a bug odbc_num_fields function in Windows 2003 operating
> systems becuase in Windows 2003 , when I run PHP with IIS I faced many
> problems. :)
>
>
> --
> Haydar TUNA
> Republic Of Turkey - Ministry of National Education
> Education Technology Department Ankara / TURKEY
> Web: http://www.haydartuna.net
>
>
> ""bedul"" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > - Original Message -
> > From: "gunawan" <[EMAIL PROTECTED]>
> > To: 
> > 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..
> >> 
> >> Using odbc_num_fields  >>
> >> //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.="\ntotal column=".$n;
> >> }
> >>
> >> //$txt.= readThisFile($filename);
> >>
> >> print $txt;
> >> ?>
> >>
> >> ---
> >>
>
> --
> 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] Re: odbc problem

2007-03-12 Thread bedul
allright.. i don't blame anyone..
i just wanna say

"thanks to everyone for helping me.."

perhaps u right.. more rows make the script return ERROR..

- Original Message -
From: "Haydar Tuna" <[EMAIL PROTECTED]>
To: 
Sent: Monday, March 12, 2007 2:53 PM
Subject: [PHP-DB] Re: odbc problem


> Hello,
>   I faced same problems. My table had many rows but I couldn't run
> odbc_num_fields. It return -1 result. I looked PHP help file. But I get
rows
> with odbc_fetch_row() function. My operating system was Windows 2003. I
> think, there is a bug odbc_num_fields function in Windows 2003 operating
> systems becuase in Windows 2003 , when I run PHP with IIS I faced many
> problems. :)
>
>
> --
> Haydar TUNA
> Republic Of Turkey - Ministry of National Education
> Education Technology Department Ankara / TURKEY
> Web: http://www.haydartuna.net
>
>
> ""bedul"" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > - Original Message -
> > From: "gunawan" <[EMAIL PROTECTED]>
> > To: 
> > 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..
> >> 
> >> Using odbc_num_fields  >>
> >> //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.="\ntotal column=".$n;
> >> }
> >>
> >> //$txt.= readThisFile($filename);
> >>
> >> print $txt;
> >> ?>
> >>
> >> ---
> >>
>
> --
> 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] Re: odbc problem

2007-03-11 Thread Haydar Tuna
Hello,
  I faced same problems. My table had many rows but I couldn't run 
odbc_num_fields. It return -1 result. I looked PHP help file. But I get rows 
with odbc_fetch_row() function. My operating system was Windows 2003. I 
think, there is a bug odbc_num_fields function in Windows 2003 operating 
systems becuase in Windows 2003 , when I run PHP with IIS I faced many 
problems. :)


-- 
Haydar TUNA
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net


""bedul"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> - Original Message -
> From: "gunawan" <[EMAIL PROTECTED]>
> To: 
> 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..
>> 
>> Using odbc_num_fields >
>> //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.="\ntotal column=".$n;
>> }
>>
>> //$txt.= readThisFile($filename);
>>
>> print $txt;
>> ?>
>>
>> ---
>> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: odbc problem

2007-03-11 Thread bedul

- Original Message -
From: "IMRAN" <[EMAIL PROTECTED]>
To: ""bedul"" <[EMAIL PROTECTED]>
Cc: "php.db" 
Sent: Monday, March 12, 2007 1:03 PM
Subject: Re: odbc problem


> Is odbc_num_fields return any value ?
> You can disable the warnings in php.ini file.
>
> Please let me know if that helps...
nope.. no value has been return.. but it kind strange
Using odbc_field_len
No rows found
odbc connected
total column=268

it return the column but not the value inside?? strange??
the more strange was it should return 300++??

i'm curious about this warning line

Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché ODBC][State :
S1000][Native Code 400] [D:\Aplikasi\xampp\apache\bin\apache.exe] General
server error, SQL state S1000 in SQLExecDirect in
D:\Aplikasi\xampp\htdocs\tes\odbc\c-4.php on line 11
===
"General server error, SQL "
any clue anyone.. i believe this the problem begin..

fyi.. i already close after open the database. but nothing good happen.

thx to anyone reply..


> - Original Message -
> From: ""bedul"" <[EMAIL PROTECTED]>
> Newsgroups: php.db
> To: 
> Sent: Monday, March 12, 2007 10:21 AM
> Subject: Fw: odbc problem
>
>
> >
> > - Original Message -
> > From: "gunawan" <[EMAIL PROTECTED]>
> > To: 
> > 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..
> > > 
> > > Using odbc_num_fields  > >
> > > //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.="\ntotal column=".$n;
> > > }
> > >
> > > //$txt.= readThisFile($filename);
> > >
> > > print $txt;
> > > ?>
> > >
> > > ---
> > >
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: odbc problem

2007-03-11 Thread IMRAN
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"" <[EMAIL PROTECTED]>
Newsgroups: php.db
To: 
Sent: Monday, March 12, 2007 10:21 AM
Subject: Fw: odbc problem


>
> - Original Message -
> From: "gunawan" <[EMAIL PROTECTED]>
> To: 
> 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..
> > 
> > Using odbc_num_fields  >
> > //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.="\ntotal column=".$n;
> > }
> >
> > //$txt.= readThisFile($filename);
> >
> > print $txt;
> > ?>
> >
> > ---
> >

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: ODBC Problem

2005-10-14 Thread Serafin Agoiz
Good morning Rodrigo (morning at least here :-) )

Take a look at this link:
http://www.shawnolson.net/a/946/

I had the same problem and now it's solved.

The problem is that MySQL and maybe another DDBB, they doesn't expect the
data to be in utf8.

I have added this line:

$variable = mysql_query("SET NAMES  'utf8'");

before to insert the datas and before to select,
and now everything is working.

Let me now if yor try it and works.

Thanks.
Serafin


Rodrigo Haces wrote:

> 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