[PHP-DB] ODBC: access

2007-02-05 Thread bedul
TEST CONNECT";
// to have this working:
// 1- u  have first to creat ur access database using MS
// Access  (i asume u know how to do this). My database
// that i used in my example is called "Questionaire.mdb".
// the table in it is called "Results"
//
// 2- then u have to add this database to ODBC in the
// control panel.
//
// 3- the adition happens by adding "MS Access Driver" to the
// "System DNS" tab in ODBC Data Source Administrator. if
// u have that "MS Access Driver" in "User DNS" tab, then
// u have to delete it.
//
// 4- click on Add in the "System DNS" tab.
//
// 5- choose "MS Access Driver" from the "Creat New
// Database Source" window and click finish.
//
// 6- then the "ODBC MS Access Setup" window will pop-up.
//
// 7- give the driver the name that you want to use in your
// PHP scripting. i used here "MSAccessDriver".
// 8- after this, choose the "Select" button in "ODBC MS
// Access Setup" to set the path of your Access database.
//
// 9-then u r done!!
// this odbc_connect does the connection to the driver i
// created in the ODBC Administrator

$con= odbc_connect(gundamDB, gunawan,'' ); //=> for the first i don't use
config yet
if ($con)
{
 echo "odbc connected
";

}
else
 echo "odbc not connected
";

odbc_close($con) ;


 echo ' return';
?>

the question is..
$con= odbc_connect(gundamDB, gunawan,'' );
in odbc.. i make the user landavia and password landavia
but this return able to connect.. is there something wrong???

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



[PHP-DB] ODBC data types

2006-09-17 Thread Stephen Brooks
I am accessing a Microsoft Access 2000 database using the Unified ODBC 
functions.  My problem is that some SQL field types are not recognised and 
cause the database driver to a (generic) syntax error.  For instance


odbc_exec($odbc,'CREATE TABLE FormData (formid LONG,dataphp LONG VARCHAR)');

...does not work because of "LONG VARCHAR".  I've tried various things and 
find that VARCHAR works, but is restricted to 256 characters (TEXT is 
accepted but appears to have the same restriction).  VARBINARY seems OK on 
that statement but the field is truncated to 1 character (might be my 
mistake here).  And BLOB, LONG VARCHAR, LONG VARBINARY and variants thereof 
are all not accepted.


Oddly, "LONG" is accepted even though in SQL it should be "BIGINT" or 
similar (which is not accepted).


I want a field that will work and allows 64k or more characters in a string 
(ideally binary).


-Stephen 


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



[PHP-DB] odbc unable to connect

2006-05-04 Thread pons

Subj: Connect Oracle 10g using ODBC on Linux platform

I found message when I connect to ORACLE through my Explorer. Here:
Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Data source
name not found,
and no default driver specified, SQL state IM002 in SQLConnect in
/srv/www/htdocs/sdc/ora_test.php on line 8

my PHP script:


Server: SLES 9 Linux king 2.6.5-7.191-bigsmp #1 SMP Tue Jun 28 14:58:56 UTC
2005 i686 i686 i386 GNU/Linux
Oracle: SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 4 11:24:18 2006
PHP: PHP 4.3.4 (cli) (built: Jul  1 2004 16:44:46)/Copyright (c) 1997-2003
The PHP Group/Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
ODBC: ODBC Support enabled


Can you tell me why ?


--
Master of Science in Electrical Engineering (TH Aachen)
Communications/Network and Systems Engineer
IBM AIX System Specialist/CCNP/CCSP


[PHP-DB] ODBC - PHP - Unicode problem

2006-02-07 Thread Erik .

Hi all,
I have an elusive problem with PHP and ODBC.
I want to use ODBC to contact a MSSQL server on an NT box, from a linux 
machine.

FreeTDS driver, no problem
unixODBC, no problem
I can contact the correct database on the NT box through isql and tsql, no 
problem

I can make a command-line PHP script that queries the database, no problem

BUT when I try to run the exact same script over a webserver (apache 1.3.34) 
I get the error "Can't initiate unicode conversion" and the db connection 
never gets made.


Now I have no idea where to look.
Any pointers?

-Erik

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



Re: [PHP-DB] odbc vs. oci8

2005-11-08 Thread Alain Rivest

Julien Bonastre a écrit :


and relation to Ronald Rivest??

As in the "Ronald Rivest, Leonard Adleman, Adi Shamir?" RSA Encryption 
Rivest?




Just curious :-)



No! :)

--

Alain -- http://www.vivahate.org

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



Re: [PHP-DB] odbc vs. oci8

2005-11-03 Thread Alain Rivest

Christopher Jones a écrit :


Alain Rivest wrote:


Hi, which one is the fastest: odbc or oci8?

I use PHP 5 with IIS on Windows Server 2003 with Oracle 8 and 9 on 
several Alpha Servers with OpenVMS. Which one should I choose, odbc 
or oci8? Does oci8 works with Oracle 9i?


For now I wrote my web applications with odbc support because the 
other apps at my job were usings that. But it's a bit slow and since 
I don't really know the difference I chose odbc...


Any advice? Thanks a lot!



Use OCI8 it will be fastest.  Specifically, use the refactored oci8 
driver,

which is not yet in the PHP 5 source bundle:
http://netevil.org/node.php?uuid=431eeaf6-5744-8225-2552-31eeaf6e8506

The oci8 driver works with Oracle 8, 9 and 10.




Ok thanks I'll try that!

--

Alain -- http://www.vivahate.org

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



[PHP-DB] odbc vs. oci8

2005-10-19 Thread Alain Rivest

Hi, which one is the fastest: odbc or oci8?

I use PHP 5 with IIS on Windows Server 2003 with Oracle 8 and 9 on 
several Alpha Servers with OpenVMS. Which one should I choose, odbc or 
oci8? Does oci8 works with Oracle 9i?


For now I wrote my web applications with odbc support because the other 
apps at my job were usings that. But it's a bit slow and since I don't 
really know the difference I chose odbc...


Any advice? Thanks a lot!

--

Alain -- http://www.vivahate.org

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



RE: [PHP-DB] ODBC Problem

2005-10-11 Thread Serafin Agoiz
Good morning, 
I have almost the same problem, but just with cirilic characters.

I have this state on every page, html and php:


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:
> 
> 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

2005-10-11 Thread Matthias Willerich
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:

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

2005-10-10 Thread Rodrigo Haces
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 extra parameters

2005-06-15 Thread Robert Binneman
Hi all,

I have an application that needs to connect to an ODBC datasource which
requires additional parameters to allow the connection.

In VB the connection string takes the following form:
"DSN=DATASOURCE;GR_UID=USERNAME;GR_PWD=PASSWORD"

I can see no way to pass the GR_UID and GR_PWD parameters.  I have
searched all over, and don't find anything related.

Any help in this regard will be greatly appreciated.

Thanks in advance,

Robert Binneman

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



RE: [PHP-DB] odbc quest

2004-11-16 Thread Norland, Martin
>$sql = "SELECT * FROM users WHERE username='$username' AND
password='$password'";
>$result = odbc_exec($dbConnection, $sql);
>
>while ($rows = odbc_fetch_array($result)) {
> //This doesn't work with odbc_fetch_object either
> print $rows->COLUMNNAME;
>}

It's returning an array, not an object (I can't speak as to how the
odbc_fetch_object function behaves - it seems poorly documented, but it
looks like you get back something more fancy than a simple object with
named variables).

In short, use odbc_fetch_array and refer to the items as
$rows["COLUMNNAME"] (or use single quotes).


- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.

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



[PHP-DB] odbc quest

2004-11-16 Thread Adil
Hey people,

Again, thanks to anyone whose answered my questions, its helping out a great
deal.

I figured out the sessions issues thanks to some of the replies I received
but if its not one thing its the other it seems.

Anyone know much about odbc_fetch_array() or odbc_fetch_object() functions
in php.  My while loop keeps breaking while using this function.  I'm trying
to grab a row from the result returned by the database query and for testing
purposes, just printing out each item in the row as follows:

$sql = "SELECT * FROM users WHERE username='$username' AND
password='$password'";
 $result = odbc_exec($dbConnection, $sql);

while ($rows = odbc_fetch_array($result)) {   //This doesn't work with
odbc_fetch_object either
 print $rows->COLUMNNAME;
  }


I get nothing at all which I find pretty strange so I wanted to know if
there were any bugs with this function, maye while working on IIS or just
problems with the functions themselves.

Thx again
Adil.

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



Re: [PHP-DB] ODBC Column Name Truncation

2004-09-09 Thread Robert Twitty
The reason is because the buffer used by the odbc extension to store field
names is only 32 bytes. You can try using the sybase or odbtp extension.
Otherwise,  you will have to submit it as a bug, so that it will be fixed.

-- bob

On Thu, 9 Sep 2004, Anthony Robins wrote:

> When retrieving ODBC results from Sybase SQL Anywhere 6 and 9, the
> column names are being truncated to 31 characters. --
>
>  $DBN = 'thedbn';
> $UID = 'theuid';
> $PWD = 'thepws';
>
> $CONN = odbc_connect( $DBN, $UID, $PWD ) or die( "Cannot connect to
> $DBN."); $sql = "select * from crap"; $result = odbc_exec( $CONN,
> $sql );
>
> for( $i = 1 ; $i <= odbc_num_fields( $result ) ; $i++ ) {
>$name = odbc_field_name( $result, $i );
>${$name} = odbc_result( $result, $name );
>print( "$i: $name - ${$name}\n" );
> }
> ?>
>
> Result:
> 1: key - 4
> 2: a_really_long_name_that_is_long - 5
> 3: longer_name - 6
>
> I expected #2 to have the name:
> a_really_long_name_that_is_longer_than_31_characters
>
> -- This happens even if the column name is simply specified using sql
> 'AS' (i.e. "select column as
> a_really_long_name_that_is_longer_than_31_characters from crap" would
> still return "a_really_long_name_that_is_long" as the column name).
>
> Using PHP 4.3.4 on Windows 2000 Server. Have also tried on SUSE Linux
> as well as with PHP 5.
>
> --
> 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 Column Name Truncation

2004-09-09 Thread Anthony Robins
When retrieving ODBC results from Sybase SQL Anywhere 6 and 9, the
column names are being truncated to 31 characters. --



Result:
1: key - 4
2: a_really_long_name_that_is_long - 5
3: longer_name - 6

I expected #2 to have the name:
a_really_long_name_that_is_longer_than_31_characters

-- This happens even if the column name is simply specified using sql
'AS' (i.e. "select column as
a_really_long_name_that_is_longer_than_31_characters from crap" would
still return "a_really_long_name_that_is_long" as the column name).

Using PHP 4.3.4 on Windows 2000 Server. Have also tried on SUSE Linux
as well as with PHP 5.

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



Re: [PHP-DB] ODBC avec PHP

2004-07-08 Thread Robert Twitty
The latest version of ADODb supports odbtp.  You can get it at
http://odbtp.sourceforge.net. There are 2 versions of the ADODb driver:
odbtp and odbtp_unicode.  The problem you are having is caused by the
inability of the ODBC driver to provide what the desired information. The
FreeTDS ODBC driver still needs some more work.  The odbtp extension
currently provides the most complete support for SQL Server 2000.

-- bob

On Thu, 8 Jul 2004, Jean-François Léost wrote:

> Hi
> Thanks for your answer but :
>
> What is odbtp extension  I don't find it on www.php.net ???
>
> I use ADOdb to database abstraction and I can't change all the ADOdb code.
>
> Do you know why the function "odbc_field_type" don't give me the good result
> ?
> Is is a PHP error, an unixODBC error or a freeTDS error ?
>
> To acces to MsSqlServer, which ODBC connection do you prefer ?
>
> thx to help me
> Jeff
>
>
> "Robert Twitty" <[EMAIL PROTECTED]> a écrit dans le message de
> news:[EMAIL PROTECTED]
> You will have much better results if you use the odbtp extension instead
> of the odbc extenstion, especially on Linux. The odbtp_field_type()
> function will give you the correct type name.
>
> Also, you could use the mssql extension. However, mssql_field_type()
> returns type names that are not exact. For example, it returns "char" for
> all character fields even if their type is "varchar", "text", "nchar",
> "nvarchar" or "ntext".
>
> -- bob
>
> On Thu, 8 Jul 2004, Jean-François Léost wrote:
>
> > hi
> >
> > I want to use the function "odbc_field_type" on a linux mandrake 10 with
> PHP
> > 4.3.7 with unixODBC et freeTDS
> >
> > This function never give me a good answer :
> >
> > Example of an answer :
> > Xÿ¿p [EMAIL PROTECTED] [EMAIL PROTECTED]@[EMAIL PROTECTED]@
> >
> > Someone can help me ?
> >
> > Jeff
> >
> > --
> > 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 avec PHP

2004-07-08 Thread Jean-François Léost
Hi
Thanks for your answer but :

What is odbtp extension  I don't find it on www.php.net ???

I use ADOdb to database abstraction and I can't change all the ADOdb code.

Do you know why the function "odbc_field_type" don't give me the good result
?
Is is a PHP error, an unixODBC error or a freeTDS error ?

To acces to MsSqlServer, which ODBC connection do you prefer ?

thx to help me
Jeff


"Robert Twitty" <[EMAIL PROTECTED]> a écrit dans le message de
news:[EMAIL PROTECTED]
You will have much better results if you use the odbtp extension instead
of the odbc extenstion, especially on Linux. The odbtp_field_type()
function will give you the correct type name.

Also, you could use the mssql extension. However, mssql_field_type()
returns type names that are not exact. For example, it returns "char" for
all character fields even if their type is "varchar", "text", "nchar",
"nvarchar" or "ntext".

-- bob

On Thu, 8 Jul 2004, Jean-François Léost wrote:

> hi
>
> I want to use the function "odbc_field_type" on a linux mandrake 10 with
PHP
> 4.3.7 with unixODBC et freeTDS
>
> This function never give me a good answer :
>
> Example of an answer :
> Xÿ¿p [EMAIL PROTECTED] [EMAIL PROTECTED]@[EMAIL PROTECTED]@
>
> Someone can help me ?
>
> Jeff
>
> --
> 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 avec PHP

2004-07-08 Thread Robert Twitty
You will have much better results if you use the odbtp extension instead
of the odbc extenstion, especially on Linux. The odbtp_field_type()
function will give you the correct type name.

Also, you could use the mssql extension. However, mssql_field_type()
returns type names that are not exact. For example, it returns "char" for
all character fields even if their type is "varchar", "text", "nchar",
"nvarchar" or "ntext".

-- bob

On Thu, 8 Jul 2004, Jean-François Léost wrote:

> hi
>
> I want to use the function "odbc_field_type" on a linux mandrake 10 with PHP
> 4.3.7 with unixODBC et freeTDS
>
> This function never give me a good answer :
>
> Example of an answer :
> Xÿ¿p [EMAIL PROTECTED] [EMAIL PROTECTED]@[EMAIL PROTECTED]@
>
> Someone can help me ?
>
> Jeff
>
> --
> 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 avec PHP

2004-07-08 Thread Jean-François Léost
hi

I want to use the function "odbc_field_type" on a linux mandrake 10 with PHP
4.3.7 with unixODBC et freeTDS

This function never give me a good answer :

Example of an answer :
Xÿ¿p [EMAIL PROTECTED] [EMAIL PROTECTED]@[EMAIL PROTECTED]@

Someone can help me ?

Jeff

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



RE: [PHP-DB] ODBC support

2004-03-12 Thread Galbreath, Mark A
This looks really great, Bob...thx!

Mark

-Original Message-
From: Robert Twitty [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 10:19 AM
To: Galbreath, Mark A
Cc: '[EMAIL PROTECTED]'
Subject: Re: [PHP-DB] ODBC support


Hi Mark

An alternative solution for connecting to MS Access is odbtp.  Details are
available at http://odbtp.sourceforge.net.  It provides better support for
ODBC, especially in regards to MS Access.  Take a look at the
storedqry.php example at http://odbtp.sourceforge.net/examples.html.  It
shows how to execute a MS Access stored query.

The odbtp extension has a higher performance, and it allows you to
remotely connect to your Access database from any platform.

-- bob

On Thu, 11 Mar 2004, Galbreath, Mark A wrote:

> Yes, I'm a newbie to PHP, but I got a phpBB2 BBS online in a day and I'm
> psyched.
>
> My problem is, the PHP docs and API mention that ODBC is built into PHP
4.x
> but I can't figure out how to use it.  I would like to access the M$
Access
> JET engine directly from a PHP page.  Any clues?
>
> tia,
> Mark
>
> --
> 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 support

2004-03-12 Thread Robert Twitty
Hi Mark

An alternative solution for connecting to MS Access is odbtp.  Details are
available at http://odbtp.sourceforge.net.  It provides better support for
ODBC, especially in regards to MS Access.  Take a look at the
storedqry.php example at http://odbtp.sourceforge.net/examples.html.  It
shows how to execute a MS Access stored query.

The odbtp extension has a higher performance, and it allows you to
remotely connect to your Access database from any platform.

-- bob

On Thu, 11 Mar 2004, Galbreath, Mark A wrote:

> Yes, I'm a newbie to PHP, but I got a phpBB2 BBS online in a day and I'm
> psyched.
>
> My problem is, the PHP docs and API mention that ODBC is built into PHP 4.x
> but I can't figure out how to use it.  I would like to access the M$ Access
> JET engine directly from a PHP page.  Any clues?
>
> tia,
> Mark
>
> --
> 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 support

2004-03-11 Thread Brian Mansell
Take a look at ADODB (It's a good database library that supports a
variety of systems):
http://php.weblogs.com/ADODB


Here's a quick intro:
http://www.databasejournal.com/features/php/article.php/651


-Original Message-
From: Galbreath, Mark A [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 11, 2004 2:04 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] ODBC support

Yes, I'm a newbie to PHP, but I got a phpBB2 BBS online in a day and I'm
psyched.

My problem is, the PHP docs and API mention that ODBC is built into PHP
4.x
but I can't figure out how to use it.  I would like to access the M$
Access
JET engine directly from a PHP page.  Any clues?

tia,
Mark

-- 
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 support

2004-03-11 Thread Bruno Ferreira
Galbreath, Mark A wrote:

Yes, I'm a newbie to PHP, but I got a phpBB2 BBS online in a day and I'm
psyched.
My problem is, the PHP docs and API mention that ODBC is built into PHP 4.x
but I can't figure out how to use it.  I would like to access the M$ Access
JET engine directly from a PHP page.  Any clues?
tia,
Mark
 

   ODBC function reference is present at 
http://pt.php.net/manual/en/ref.odbc.php (you can choose a closer mirror 
if you want). Scroll down to the bottom of the page to look at the 
functions list and some immediate examples. Re-post if you need further 
information.

   Bruno Ferreira
---
[This E-mail scanned for viruses by Declude Virus]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] ODBC support

2004-03-11 Thread Galbreath, Mark A
Yes, I'm a newbie to PHP, but I got a phpBB2 BBS online in a day and I'm
psyched.

My problem is, the PHP docs and API mention that ODBC is built into PHP 4.x
but I can't figure out how to use it.  I would like to access the M$ Access
JET engine directly from a PHP page.  Any clues?

tia,
Mark

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



Re: [PHP-DB] ODBC with SQL Server

2004-02-13 Thread Robert Twitty
You cannot use the odbc & mssql extensions to read nvarchar & ntext
fields. You will have to use the odbtp extension located at
http://odbtp.sourceforge.net.  It provides support for UNICODE data.

-- bob

On Fri, 13 Feb 2004, Juan Torres wrote:

> Hello,
>
> I have a connectoin ODBC with a SQL Server database. A table has a field of
> type 'nvarchar'. This field contains japanese characters.
> How can I read these japanese characteres? When I read (with: "select name
> from data") only read '?' character.
>
> Thaks very much.
> Juan Torres.
>
> --
> 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 with SQL Server

2004-02-13 Thread Juan Torres
Hello,

I'm working with a DB SQL Server. This DB has a table with Japanese
characters.
When I read a field (with Japanese characters) with function
mssql_fetch_array(), always it return characters '?'.

If I put 'print("(Japanese characters)");', these Japanese characters are
shown correctly.

My PHP file has follow code to work with Japanese characters:

mb_internal_encoding("EUC-JP");
mb_http_output("EUC-JP");
mb_http_input("EUC-JP");
mb_language("Japanese");

My question: How can I show correctly the Japanese characters from a SQL
Server DataBase?

Thanks very much!
Juan Torres.

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



[PHP-DB] ODBC with SQL Server

2004-02-13 Thread Juan Torres
Hello,

I have a connectoin ODBC with a SQL Server database. A table has a field of
type 'nvarchar'. This field contains japanese characters.
How can I read these japanese characteres? When I read (with: "select name
from data") only read '?' character.

Thaks very much.
Juan Torres.

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



[PHP-DB] ODBC in PHP4.3.4 crashes when used with Mysql 4

2004-01-14 Thread Nico Sabbi

Hi,
I have Mysql-4.0-14, MyODBC 3.51.06 and unixODBC 2.2.0. They are working
perfectly together
(isql works correctly) but php-4.3.x always crashes when I try
odbc_connect() on
the same DSN I use with isql (env vars are correctly set).

Is this a known bug?

This is a bt of a simplified example that leads to crash:

[EMAIL PROTECTED] php-4.3.4]# gdb sapi/cli/php
GNU gdb Red Hat Linux (5.1.90CVS-5)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run
Starting program: /root/apache/php-4.3.4/sapi/cli/php
[New Thread 1024 (LWP 15719)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 15719)]
0x080839ee in strxmov (dst=0x8513ab9 "", src=0x204d )
at /root/apache/php-4.3.4/ext/mysql/libmysql/strxmov.c:26
26  while ((*dst++ = *src++)) ;
(gdb) bt
#0  0x080839ee in strxmov (dst=0x8513ab9 "", src=0x204d )
at /root/apache/php-4.3.4/ext/mysql/libmysql/strxmov.c:26
#1  0x401fe68a in set_connect_defaults () from /usr/local/lib/libmyodbc3.so
#2  0x401fed73 in SQLConnect () from /usr/local/lib/libmyodbc3.so
#3  0x400b338a in SQLConnect () from /usr/lib/libodbc.so.1
#4  0x0808b37f in odbc_sqlconnect (conn=0xbfffa1d0, db=0x8520bd4 "mysql",
uid=0x8520afc "root", pwd=0x85130ac "root", cur_opt=2,
persistent=0) at /root/apache/php-4.3.4/ext/odbc/php_odbc.c:2118
#5  0x0808bd1e in odbc_do_connect (ht=3, return_value=0x851326c,
this_ptr=0x0, return_value_used=1, persistent=0)
at /root/apache/php-4.3.4/ext/odbc/php_odbc.c:2316
#6  0x0808b019 in zif_odbc_connect (ht=3, return_value=0x851326c,
this_ptr=0x0, return_value_used=1)
at /root/apache/php-4.3.4/ext/odbc/php_odbc.c:2045
#7  0x0819201f in execute (op_array=0x8233d00) at
/root/apache/php-4.3.4/Zend/zend_execute.c:1616
#8  0x08192252 in execute (op_array=0x8222818) at
/root/apache/php-4.3.4/Zend/zend_execute.c:1660
#9  0x08175206 in call_user_function_ex (function_table=0x81df0a8,
object_pp=0x0, function_name=0x84393f4, retval_ptr_ptr=0xbfffb58c,
param_count=2, params=0x8520a24, no_separation=1, symbol_table=0x0) at
/root/apache/php-4.3.4/Zend/zend_execute_API.c:567
#10 0x08174998 in call_user_function (function_table=0x81df0a8,
object_pp=0x0, function_name=0x84393f4, retval_ptr=0x85209e4,
param_count=2, params=0xbfffb618) at
/root/apache/php-4.3.4/Zend/zend_execute_API.c:409
#11 0x080ad227 in ps_call_handler (func=0x84393f4, argc=2, argv=0xbfffb618)
at /root/apache/php-4.3.4/ext/session/mod_user.c:60
#12 0x080ad3d5 in ps_open_user (mod_data=0x81dabb0, save_path=0x81e46a8
"/tmp", session_name=0x81e4760 "nemoSession")
at /root/apache/php-4.3.4/ext/session/mod_user.c:98
#13 0x080a8eec in php_session_initialize () at
/root/apache/php-4.3.4/ext/session/session.c:598
#14 0x080aa366 in php_session_start () at
/root/apache/php-4.3.4/ext/session/session.c:1047
#15 0x080abeb4 in zif_session_start (ht=0, return_value=0x852078c,
this_ptr=0x0, return_value_used=0)
at /root/apache/php-4.3.4/ext/session/session.c:1486
#16 0x0819201f in execute (op_array=0x821e8ec) at
/root/apache/php-4.3.4/Zend/zend_execute.c:1616
#17 0x0817fd00 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at
/root/apache/php-4.3.4/Zend/zend.c:884
#18 0x08147956 in php_execute_script (primary_file=0xbfffe6e0) at
/root/apache/php-4.3.4/main/main.c:1729
#19 0x081987ae in main (argc=1, argv=0xbfffe784) at
/root/apache/php-4.3.4/sapi/cli/php_cli.c:819
#20 0x42017499 in __libc_start_main () from /lib/i686/libc.so.6


Thanks,
Nico

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



RE: [PHP-DB] ODBC

2003-10-15 Thread Robert Twitty
Take a look at ODBTP, which is located at http://odbtp.sourceforge.net.
ODBTP allows you to remotely connect to Win32-based ODBC from any machine,
including Linux/UNIX.

-- bob

On Wed, 15 Oct 2003, Ricardo C. Fernandez de C. wrote:

> Hi,
> The sad part is that there is 0 documentation about how to connect to
> remote ODBC DSN, or a detailed structure of how to connect to it besides
> the odbc_connect(dsn,user,password), DSN could be string that tells the
> function where is the dsn, what database, what driver... but is not
> documented. I guess i will just read the file with the dbase funtions
> and convert it to psql, its not going to be real time, but oh well,
> thanks for the help.
>
> On Wed, 2003-10-15 at 04:07, Michael.J.Bourke wrote:
> > I think you will have to create a DSN on each machine you use to serve PHP
> > pages.
> > Otherwise, you might want to look into using DSN-less connections instead.
> >
> > -Original Message-
> > From: Ricardo C. Fernandez de C. [mailto:[EMAIL PROTECTED]
> > Sent: 14 October 2003 16:22
> > To: php-db
> > Subject: RE: [PHP-DB] ODBC
> >
> >
> > Ok, it worked on the local machine if i do
> >
> > odbc_connect("telefonia","","")
> >
> > But, if i'm on the remote machine, i have a problem, the DSN will not
> > query a Database at all, it will query 3 Fox Pro Tables, what query
> > should i use then? any idea?
> >
> > thanks for the help :)
> >
> > On Tue, 2003-10-14 at 10:21, Michael.J.Bourke wrote:
> > > odbc_connect requires three parameters: you have specified just one.  PHP
> > > takes the string between the pairs of double-quotes to be just one
> > > parameter.  You will also need to specify a username and password for
> > access
> > > to the DB.  Assuming you have none, try this:
> > >
> > > $conn=odbc_connect("Driver={Microsoft Fox Pro Driver};Server=
> > > 127.0.0.1;Database=telefonia","","");
> > >
> > > -Original Message-
> > > From: Ricardo C. Fernandez de C. [mailto:[EMAIL PROTECTED]
> > > Sent: 14 October 2003 15:16
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP-DB] ODBC
> > >
> > >
> > > Hi all,
> > >
> > > I have been trying to connect to a windows ODBC controller with PHP, and
> > > after reading some of the documentation, I can't make the connection
> > >
> > > This is the Code I'm using:
> > >
> > >  > > $conn=odbc_connect("Driver={Microsoft Fox Pro Driver};Server=
> > > 127.0.0.1;Database=telefonia,,");
> > > if(!$conn) { echo "Not connected"; }
> > > ?>
> > >
> > > And i get this Warning Message:
> > >
> > > Warning: Wrong Parameter count for odbc_connect in
> > > c:\apache2\htdocs\od_connect.php on line 2
> > >
> > > And of course the "Not Connected" echo message.
> > >
> > > Any idea why is this? any good document I can read about PHP-ODBC (ODBC
> > > in Windows) besides the official Documentation? any other idea?
> > >
> > > Thanks,
> > >
> > > c'ya
> > > --
> > > Ricardo C. Fernández de C.
> > > Fundabit - Min. de Educación, Cultura y Deporte.
> > > Caracas/Venezuela
> > --
> > Ricardo C. Fernández de C.
> > Fundabit - Min. de Educación, Cultura y Deporte.
> > Caracas/Venezuela
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> --
> Ricardo C. Fernández de C.
> Fundabit - Min. de Educación, Cultura y Deporte.
> Caracas/Venezuela
>
> --
> 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

2003-10-15 Thread Ricardo C. Fernandez de C.
Hi,

The only stuff i have found about foxpro and PHP is this:

hertz:~# apt-cache search foxpro
libphp-adodb - The 'adodb' database abstraction layer for php

or do you mean something else? 

thanks for the help.

On Wed, 2003-10-15 at 08:20, Luis M Morales C wrote:
> Hello Ricardo,
> 
> I have see an litle class on phpclasses.org that open dbase files. Now on your 
> main problem to connect foxpro data base with php via ODBC you must be made 
> the next step:
> 
> 1)  Check if your Foxpro data base have ODBC drivers installed
> 2)  Made the ODBC connex  to create the DSN (you can check how to make an dsn 
> on http://www.weberdev.com)
> 3)  Check your php  to verify foxpro api is installed (write an info php file 
>  and find foxpro api over dump file info)
> 4)  Try connect to the data base
> 
> Regards,
> 
> LM
> 
> On Wednesday 15 October 2003 07:24, Ricardo C. Fernandez de C. wrote:
> > I guess i will just read the file with the dbase funtions
> > and convert it to psql, its not going to be real time, but oh well,
> > thanks for the help.
-- 
Ricardo C. Fernández de C.
Fundabit - Min. de Educación, Cultura y Deporte.
Caracas/Venezuela

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



Re: [PHP-DB] ODBC

2003-10-15 Thread Luis M Morales C
Hello Ricardo,

I have see an litle class on phpclasses.org that open dbase files. Now on your 
main problem to connect foxpro data base with php via ODBC you must be made 
the next step:

1)  Check if your Foxpro data base have ODBC drivers installed
2)  Made the ODBC connex  to create the DSN (you can check how to make an dsn 
on http://www.weberdev.com)
3)  Check your php  to verify foxpro api is installed (write an info php file 
 and find foxpro api over dump file info)
4)  Try connect to the data base

Regards,

LM

On Wednesday 15 October 2003 07:24, Ricardo C. Fernandez de C. wrote:
> I guess i will just read the file with the dbase funtions
> and convert it to psql, its not going to be real time, but oh well,
> thanks for the help.

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



RE: [PHP-DB] ODBC

2003-10-15 Thread Ricardo C. Fernandez de C.
Hi,
The sad part is that there is 0 documentation about how to connect to
remote ODBC DSN, or a detailed structure of how to connect to it besides
the odbc_connect(dsn,user,password), DSN could be string that tells the
function where is the dsn, what database, what driver... but is not
documented. I guess i will just read the file with the dbase funtions
and convert it to psql, its not going to be real time, but oh well,
thanks for the help.

On Wed, 2003-10-15 at 04:07, Michael.J.Bourke wrote:
> I think you will have to create a DSN on each machine you use to serve PHP
> pages.  
> Otherwise, you might want to look into using DSN-less connections instead.  
> 
> -Original Message-
> From: Ricardo C. Fernandez de C. [mailto:[EMAIL PROTECTED]
> Sent: 14 October 2003 16:22
> To: php-db
> Subject: RE: [PHP-DB] ODBC
> 
> 
> Ok, it worked on the local machine if i do 
> 
> odbc_connect("telefonia","","")
> 
> But, if i'm on the remote machine, i have a problem, the DSN will not
> query a Database at all, it will query 3 Fox Pro Tables, what query
> should i use then? any idea? 
> 
> thanks for the help :)
> 
> On Tue, 2003-10-14 at 10:21, Michael.J.Bourke wrote:
> > odbc_connect requires three parameters: you have specified just one.  PHP
> > takes the string between the pairs of double-quotes to be just one
> > parameter.  You will also need to specify a username and password for
> access
> > to the DB.  Assuming you have none, try this:
> > 
> > $conn=odbc_connect("Driver={Microsoft Fox Pro Driver};Server=
> > 127.0.0.1;Database=telefonia","","");
> > 
> > -Original Message-
> > From: Ricardo C. Fernandez de C. [mailto:[EMAIL PROTECTED]
> > Sent: 14 October 2003 15:16
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] ODBC
> > 
> > 
> > Hi all,
> > 
> > I have been trying to connect to a windows ODBC controller with PHP, and
> > after reading some of the documentation, I can't make the connection
> > 
> > This is the Code I'm using:
> > 
> >  > $conn=odbc_connect("Driver={Microsoft Fox Pro Driver};Server=
> > 127.0.0.1;Database=telefonia,,");
> > if(!$conn) { echo "Not connected"; }
> > ?>
> > 
> > And i get this Warning Message:
> > 
> > Warning: Wrong Parameter count for odbc_connect in
> > c:\apache2\htdocs\od_connect.php on line 2
> > 
> > And of course the "Not Connected" echo message.
> > 
> > Any idea why is this? any good document I can read about PHP-ODBC (ODBC
> > in Windows) besides the official Documentation? any other idea?
> > 
> > Thanks,
> > 
> > c'ya
> > -- 
> > Ricardo C. Fernández de C.
> > Fundabit - Min. de Educación, Cultura y Deporte.
> > Caracas/Venezuela
> -- 
> Ricardo C. Fernández de C.
> Fundabit - Min. de Educación, Cultura y Deporte.
> Caracas/Venezuela
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
-- 
Ricardo C. Fernández de C.
Fundabit - Min. de Educación, Cultura y Deporte.
Caracas/Venezuela

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



RE: [PHP-DB] ODBC

2003-10-15 Thread Michael.J.Bourke
I think you will have to create a DSN on each machine you use to serve PHP
pages.  
Otherwise, you might want to look into using DSN-less connections instead.  

-Original Message-
From: Ricardo C. Fernandez de C. [mailto:[EMAIL PROTECTED]
Sent: 14 October 2003 16:22
To: php-db
Subject: RE: [PHP-DB] ODBC


Ok, it worked on the local machine if i do 

odbc_connect("telefonia","","")

But, if i'm on the remote machine, i have a problem, the DSN will not
query a Database at all, it will query 3 Fox Pro Tables, what query
should i use then? any idea? 

thanks for the help :)

On Tue, 2003-10-14 at 10:21, Michael.J.Bourke wrote:
> odbc_connect requires three parameters: you have specified just one.  PHP
> takes the string between the pairs of double-quotes to be just one
> parameter.  You will also need to specify a username and password for
access
> to the DB.  Assuming you have none, try this:
> 
> $conn=odbc_connect("Driver={Microsoft Fox Pro Driver};Server=
> 127.0.0.1;Database=telefonia","","");
> 
> -Original Message-
> From: Ricardo C. Fernandez de C. [mailto:[EMAIL PROTECTED]
> Sent: 14 October 2003 15:16
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] ODBC
> 
> 
> Hi all,
> 
> I have been trying to connect to a windows ODBC controller with PHP, and
> after reading some of the documentation, I can't make the connection
> 
> This is the Code I'm using:
> 
>  $conn=odbc_connect("Driver={Microsoft Fox Pro Driver};Server=
> 127.0.0.1;Database=telefonia,,");
> if(!$conn) { echo "Not connected"; }
> ?>
> 
> And i get this Warning Message:
> 
> Warning: Wrong Parameter count for odbc_connect in
> c:\apache2\htdocs\od_connect.php on line 2
> 
> And of course the "Not Connected" echo message.
> 
> Any idea why is this? any good document I can read about PHP-ODBC (ODBC
> in Windows) besides the official Documentation? any other idea?
> 
> Thanks,
> 
> c'ya
> -- 
> Ricardo C. Fernández de C.
> Fundabit - Min. de Educación, Cultura y Deporte.
> Caracas/Venezuela
-- 
Ricardo C. Fernández de C.
Fundabit - Min. de Educación, Cultura y Deporte.
Caracas/Venezuela

-- 
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

2003-10-14 Thread Ricardo C. Fernandez de C.
Ok, it worked on the local machine if i do 

odbc_connect("telefonia","","")

But, if i'm on the remote machine, i have a problem, the DSN will not
query a Database at all, it will query 3 Fox Pro Tables, what query
should i use then? any idea? 

thanks for the help :)

On Tue, 2003-10-14 at 10:21, Michael.J.Bourke wrote:
> odbc_connect requires three parameters: you have specified just one.  PHP
> takes the string between the pairs of double-quotes to be just one
> parameter.  You will also need to specify a username and password for access
> to the DB.  Assuming you have none, try this:
> 
> $conn=odbc_connect("Driver={Microsoft Fox Pro Driver};Server=
> 127.0.0.1;Database=telefonia","","");
> 
> -Original Message-
> From: Ricardo C. Fernandez de C. [mailto:[EMAIL PROTECTED]
> Sent: 14 October 2003 15:16
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] ODBC
> 
> 
> Hi all,
> 
> I have been trying to connect to a windows ODBC controller with PHP, and
> after reading some of the documentation, I can't make the connection
> 
> This is the Code I'm using:
> 
>  $conn=odbc_connect("Driver={Microsoft Fox Pro Driver};Server=
> 127.0.0.1;Database=telefonia,,");
> if(!$conn) { echo "Not connected"; }
> ?>
> 
> And i get this Warning Message:
> 
> Warning: Wrong Parameter count for odbc_connect in
> c:\apache2\htdocs\od_connect.php on line 2
> 
> And of course the "Not Connected" echo message.
> 
> Any idea why is this? any good document I can read about PHP-ODBC (ODBC
> in Windows) besides the official Documentation? any other idea?
> 
> Thanks,
> 
> c'ya
> -- 
> Ricardo C. Fernández de C.
> Fundabit - Min. de Educación, Cultura y Deporte.
> Caracas/Venezuela
-- 
Ricardo C. Fernández de C.
Fundabit - Min. de Educación, Cultura y Deporte.
Caracas/Venezuela

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



RE: [PHP-DB] ODBC

2003-10-14 Thread Michael.J.Bourke
odbc_connect requires three parameters: you have specified just one.  PHP
takes the string between the pairs of double-quotes to be just one
parameter.  You will also need to specify a username and password for access
to the DB.  Assuming you have none, try this:

$conn=odbc_connect("Driver={Microsoft Fox Pro Driver};Server=
127.0.0.1;Database=telefonia","","");

-Original Message-
From: Ricardo C. Fernandez de C. [mailto:[EMAIL PROTECTED]
Sent: 14 October 2003 15:16
To: [EMAIL PROTECTED]
Subject: [PHP-DB] ODBC


Hi all,

I have been trying to connect to a windows ODBC controller with PHP, and
after reading some of the documentation, I can't make the connection

This is the Code I'm using:



And i get this Warning Message:

Warning: Wrong Parameter count for odbc_connect in
c:\apache2\htdocs\od_connect.php on line 2

And of course the "Not Connected" echo message.

Any idea why is this? any good document I can read about PHP-ODBC (ODBC
in Windows) besides the official Documentation? any other idea?

Thanks,

c'ya
-- 
Ricardo C. Fernández de C.
Fundabit - Min. de Educación, Cultura y Deporte.
Caracas/Venezuela

-- 
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

2003-10-14 Thread Ricardo C. Fernandez de C.
Hi all,

I have been trying to connect to a windows ODBC controller with PHP, and
after reading some of the documentation, I can't make the connection

This is the Code I'm using:



And i get this Warning Message:

Warning: Wrong Parameter count for odbc_connect in
c:\apache2\htdocs\od_connect.php on line 2

And of course the "Not Connected" echo message.

Any idea why is this? any good document I can read about PHP-ODBC (ODBC
in Windows) besides the official Documentation? any other idea?

Thanks,

c'ya
-- 
Ricardo C. Fernández de C.
Fundabit - Min. de Educación, Cultura y Deporte.
Caracas/Venezuela

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



Re: [PHP-DB] ODBC to MSSQL on FreeBSD for PHP

2003-10-09 Thread Robert Twitty
You should use the mssql extension for this purpose.  Another alternative
is odbtp.

-- bob

On Thu, 9 Oct 2003, rick rice wrote:

> What do I need and where can I get it?
>
> --
> 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 to MSSQL on FreeBSD for PHP

2003-10-09 Thread rick rice
What do I need and where can I get it?

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



RE: [PHP-DB] odbc

2003-09-30 Thread Simpson, Doug
I solved my problem (here).  IBM came out with new drivers and they sovled
the problem.
THanks

-Original Message-
From: Simpson, Doug 
Sent: Monday, September 29, 2003 11:38 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] odbc


I am trying to connect to an AS/400 from a Linux box running RH9.
I have installed unixODBC and the iSeries drivers.
I can run "cwbping" that tell me that I am connecting to the AS400.
I have made a scipt the following script -

ODBC Data Source






When I run this script from a web browser I get the following error in my
http error logs

[client 172.16.32.241] PHP Warning:  odbc_exec(): SQL error:
[unixODBC][IBM][iSeries
Access ODBC Driver][DB2 UDB], SQL state S1000 in SQLExecDirect in
/var/www/htdocs/odbcquery.php on line 15

Does anyone know why I am getting this?
Thank you for your time<
Doug

-- 
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

2003-09-29 Thread Simpson, Doug
I am trying to connect to an AS/400 from a Linux box running RH9.
I have installed unixODBC and the iSeries drivers.
I can run "cwbping" that tell me that I am connecting to the AS400.
I have made a scipt the following script -

ODBC Data Source






When I run this script from a web browser I get the following error in my http error 
logs

[client 172.16.32.241] PHP Warning:  odbc_exec(): SQL error: [unixODBC][IBM][iSeries
Access ODBC Driver][DB2 UDB], SQL state S1000 in SQLExecDirect in
/var/www/htdocs/odbcquery.php on line 15

Does anyone know why I am getting this?
Thank you for your time<
Doug

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



Re: [PHP-DB] ODBC Database

2003-08-14 Thread jeffrey_n_Dyke

whoops, meant to include
thishttp://www.mysql.com/downloads/api-myodbc-3.51.html


   
 
  [EMAIL PROTECTED]
 
  ane.com  To:   Gerard Samuel <[EMAIL 
PROTECTED]>
   cc:   "Larry E.Ullman" <[EMAIL 
PROTECTED]>, [EMAIL PROTECTED], Robert   
  08/11/2003 10:37  Twitty <[EMAIL PROTECTED]> 
 
  AM           Subject:  Re: [PHP-DB] ODBC Database
 
   
 
   
 





there is _definitely_ a MyOdbc  Driver.  i'm using it



  Gerard Samuel
  <[EMAIL PROTECTED]>To:   Robert Twitty
  <[EMAIL PROTECTED]>
   cc:   "Larry E.Ullman"
  <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
          08/11/2003 10:35 Subject:  Re: [PHP-DB] ODBC
  Database
  AM






Robert Twitty wrote:

>Unless I am mistaken, but isn't there an ODBC driver available for MySQL
>called MyODBC?
>
>-- bob
>
I haven't a clue.  Ill look, maybe it will help me create drivers for my
DB layer, as I already know MySQL.
Last night I successfully connected to IBM's DB2, but I didnt get far
past that as I have to figure out,
how to create tables, figure out how it likes its schemas etc, to really
give it a work out...


--
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 Database

2003-08-14 Thread Gerard Samuel
Larry E.Ullman wrote:

Im looking at venturing into working with PHP's ODBC extention.
Does anyone have any recommendations as to a Database, that is easy to
understand/get into from a novice point of view, that installs on 
windows 2k,
and is "free"?


MySQL is kind of free, installs on W2K and is easy to use but it 
doesn't require PHP's ODBC extension since PHP already has a good 
MySQL extension. If you really want to use ODBC and you have MS 
Office, you could try Access. 
What Im doing is seeing if my code will run on different databases.
Of which it currently runs on mySQL, PostgreSQL and MSSQL.
As soon as I can get PHP5 installed Ill be checking out SQLLite.
But in the meantime, Im looking for a database that would interface with 
ODBC.
I just downloaded IBM's DB2 Personal Edition, to see what I can do 
there, but,
Im just looking for advice etc from others who went down this road.

Thanks

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


Re: [PHP-DB] ODBC Database

2003-08-14 Thread Peng Cheng
i have read an article on IBM's developerWorks website.
its title should be "Leverage your Microsoft SQL Server 2000 Skills to Learn
DB2 UDB Version 8"

that should help you.

"Gerard Samuel" <[EMAIL PROTECTED]> ??:[EMAIL PROTECTED]
> Robert Twitty wrote:
>
> >Unless I am mistaken, but isn't there an ODBC driver available for MySQL
> >called MyODBC?
> >
> >-- bob
> >
> I haven't a clue.  Ill look, maybe it will help me create drivers for my
> DB layer, as I already know MySQL.
> Last night I successfully connected to IBM's DB2, but I didnt get far
> past that as I have to figure out,
> how to create tables, figure out how it likes its schemas etc, to really
> give it a work out...
>



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



Re: [PHP-DB] ODBC Database

2003-08-14 Thread jeffrey_n_Dyke

there is _definitely_ a MyOdbc  Driver.  i'm using it


   
 
  Gerard Samuel
 
  <[EMAIL PROTECTED]>To:   Robert Twitty <[EMAIL 
PROTECTED]>  
   cc:   "Larry E.Ullman" <[EMAIL 
PROTECTED]>, [EMAIL PROTECTED]   
  08/11/2003 10:35     Subject:  Re: [PHP-DB] ODBC Database
 
  AM   
 
   
 
   
 




Robert Twitty wrote:

>Unless I am mistaken, but isn't there an ODBC driver available for MySQL
>called MyODBC?
>
>-- bob
>
I haven't a clue.  Ill look, maybe it will help me create drivers for my
DB layer, as I already know MySQL.
Last night I successfully connected to IBM's DB2, but I didnt get far
past that as I have to figure out,
how to create tables, figure out how it likes its schemas etc, to really
give it a work out...


--
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 Database

2003-08-14 Thread Gerard Samuel
Robert Twitty wrote:

Unless I am mistaken, but isn't there an ODBC driver available for MySQL
called MyODBC?
-- bob

I haven't a clue.  Ill look, maybe it will help me create drivers for my 
DB layer, as I already know MySQL.
Last night I successfully connected to IBM's DB2, but I didnt get far 
past that as I have to figure out,
how to create tables, figure out how it likes its schemas etc, to really 
give it a work out...

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


[PHP-DB] ODBC Database

2003-08-11 Thread Gerard Samuel
Im looking at venturing into working with PHP's ODBC extention.
Does anyone have any recommendations as to a Database, that is easy to
understand/get into from a novice point of view, that installs on 
windows 2k,
and is "free"?
Thanks for your suggestions.

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


Re: [PHP-DB] ODBC Database

2003-08-11 Thread Gerard Samuel
[EMAIL PROTECTED] wrote:

whoops, meant to include
thishttp://www.mysql.com/downloads/api-myodbc-3.51.html
 

Unless I am mistaken, but isn't there an ODBC driver available for MySQL
called MyODBC?
-- bob

   

I haven't a clue.  Ill look, maybe it will help me create drivers for my
DB layer, as I already know MySQL.
Last night I successfully connected to IBM's DB2, but I didnt get far
past that as I have to figure out,
how to create tables, figure out how it likes its schemas etc, to really
give it a work out...
Ok, I got the driver, and Im currently using it.  Thanks.
Now lets see what quirks I run into with odbc  ;)
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] ODBC Database

2003-08-11 Thread Robert Twitty
Unless I am mistaken, but isn't there an ODBC driver available for MySQL
called MyODBC?

-- bob

On Sun, 10 Aug 2003, Gerard Samuel wrote:

> Larry E.Ullman wrote:
>
> >> Im looking at venturing into working with PHP's ODBC extention.
> >> Does anyone have any recommendations as to a Database, that is easy to
> >> understand/get into from a novice point of view, that installs on
> >> windows 2k,
> >> and is "free"?
> >
> >
> > MySQL is kind of free, installs on W2K and is easy to use but it
> > doesn't require PHP's ODBC extension since PHP already has a good
> > MySQL extension. If you really want to use ODBC and you have MS
> > Office, you could try Access.
>
> What Im doing is seeing if my code will run on different databases.
> Of which it currently runs on mySQL, PostgreSQL and MSSQL.
> As soon as I can get PHP5 installed Ill be checking out SQLLite.
> But in the meantime, Im looking for a database that would interface with
> ODBC.
> I just downloaded IBM's DB2 Personal Edition, to see what I can do
> there, but,
> Im just looking for advice etc from others who went down this road.
>
> Thanks
>
>
> --
> 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 Database

2003-08-10 Thread Larry E . Ullman
Im looking at venturing into working with PHP's ODBC extention.
Does anyone have any recommendations as to a Database, that is easy to
understand/get into from a novice point of view, that installs on 
windows 2k,
and is "free"?
MySQL is kind of free, installs on W2K and is easy to use but it 
doesn't require PHP's ODBC extension since PHP already has a good MySQL 
extension. If you really want to use ODBC and you have MS Office, you 
could try Access.

Larry

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


[PHP-DB] odbc going nuts

2003-07-04 Thread George Pitcher
Hi all,

Just finishing off a site using odbc and Access and it's thrown up a problem
that wasn't there yesterday.

I have a simple login with a username and password. If either are blank, the
user gets bumped to the login page. otherwise the user table is searched for
the username and password.

my code looks like:

$strSQL = "select * from user where (Username='$username' and
Paswd='$paswd')";

I have an error script that kicks in if the query fails, and prints the
query to screen. I've pasted the query straight into Access' SQL query
window and it worked fine.

I just can't see anything wrong with the code, or anything else.

Any suggestions (apart from dropping Access in favour of another db - client
choice)

Cheers

George in Oxford


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



[PHP-DB] ODBC conection with DB2

2003-06-17 Thread Norma Ramirez - TECNOSOFT
Hi, I need to do a ODBC conexión with DB2 over AS400 for a php aplication, my 
aplication is in a web server wiht linux red hat 7.0, I´ve
 already downloaded the unixODBC driver and the iSeriesODBC from IBM page, but when I 
run the installation 
command: rpm -ivh iSeriesODBC-5.1.0-0.xx..rpm. I´get this error:
odbcinst: iniOpen failed on /unixodbcregistration.
Could someone help??? 
Thank´s.
Norma Ramirez



Re: [PHP-DB] ODBC equiv for mysql_insert_id

2003-06-16 Thread CPT John W. Holmes
> I am connecting to MySQL (4.1) using ODBC (I have my reasons) and am
looking
> for an equivalent to the mysql_insert_id() function so that I can get the
ID
> of the record just created.

You could always just issue a SELECT LAST_INSERT_ID() query and get the
resulting number that way.

---John Holmes...


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



[PHP-DB] ODBC equiv for mysql_insert_id

2003-06-16 Thread George Pitcher
Hi,

I am connecting to MySQL (4.1) using ODBC (I have my reasons) and am looking
for an equivalent to the mysql_insert_id() function so that I can get the ID
of the record just created.

Cheers

George



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



RE: [PHP-DB] ODBC and error management

2003-06-10 Thread George Pitcher
Nico,

I'm using MyODBC to query MySQL (because my client want's it to work in
Access, and I don't and this leaves the least amount of code to change).

I don't get an error message if the result is empty (no records). I do a
while loop and add to a counter and if the counter <1 then its empty
otherwise I display the results. I do get the errors though when the query
is 'bad' - contains errors.

I'm running mine on both WinNT and  Win2K with identical results.

Hope this helps.

George

> -Original Message-
> From: Nico Sabbi [mailto:[EMAIL PROTECTED]
> Sent: 10 June 2003 12:01 pm
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] ODBC and error management
>
>
>
>
> Hi,
>
> reading both the documentation and the MARC I found two serious
> misbehaviours:
>
> 1) it seems that it's impossible to tell a query that is correct
> but has no
> records
> from a query which is syntactically wrong (and consequently has
> no records);
>
> or at least it seems to be impossibile to distinguish these two cases
> without using odbc_num_rows, which is buggy itself
> (because it loses in generality, so can't be used).
>
> 2) when using myodbc the string returned by odbc_errormsg() is always
> non-sense: it doesn't contain
> the real error msg returned by the db-server, but
>
> "unixODBC][MySQL][ODBC 3.51 Driver][mysqld-3.23.56-Max-log]Option value
> changed to default static cursor"
>
> that obviously doesn't say anything useful.
>
>
> Is there a way to workaround, or even better to solve, these problems?
>
> Thanks,
>   Nico
>
>
>
>
>
>
>
>
> --
> 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 and error management

2003-06-10 Thread Nico Sabbi


Hi,

reading both the documentation and the MARC I found two serious
misbehaviours:

1) it seems that it's impossible to tell a query that is correct but has no
records
from a query which is syntactically wrong (and consequently has no records);

or at least it seems to be impossibile to distinguish these two cases
without using odbc_num_rows, which is buggy itself
(because it loses in generality, so can't be used).

2) when using myodbc the string returned by odbc_errormsg() is always
non-sense: it doesn't contain
the real error msg returned by the db-server, but

"unixODBC][MySQL][ODBC 3.51 Driver][mysqld-3.23.56-Max-log]Option value
changed to default static cursor"

that obviously doesn't say anything useful.


Is there a way to workaround, or even better to solve, these problems?

Thanks,
Nico








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



[PHP-DB] ODBC driver for ORACLE

2003-05-28 Thread Alain BARBU
Hi,

Is there any free ODBC Driver for ORACLE 9i to use with PHP, APACHE, LINUX ?

Regards
Alain


[PHP-DB] ODBC cursor join

2003-03-24 Thread Chris Berlioz
Does anyone know how to join cursors after having successfull query ie:

I have multiple queries that get data from different sources and now I need
to join the results, how can I achieve this in PHP  (Do I need to write into
a temporary table and then requery? is that the only way?  I am using MySQL.
I have started to play around with "SQL_CUR_USE_ODBC" as a 4th parameter in
the odbc_connect( ).

--





























**
The Company reserves the right to amend statements
made herein in the event of a mistake. Unless expressly
stated herein to the contrary, only agreements in writing signed
by an authorized officer of the Company may be enforced against it.

***



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



[PHP-DB] ODBC problem

2003-03-13 Thread Kiswa
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



[PHP-DB] ODBC Query max()

2003-03-12 Thread Squirrel User
I'm trying to extract one record that has largest sequence ID number for an 
employee, so I've tried below but doesn't work.  Help.

$mQuery = "EmployeeID = '$user'";
$mCur = odbc_exec( $mCnx, "select ID=max(ID),Date,TimeIn,TimeOut,StationIP 
from Clocks where $mQuery" );


-
This mail sent through ISOT.  To find out more 
about ISOT, visit http://isot.com

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



RE: [PHP-DB] ODBC

2003-03-07 Thread Beverly Steiner
No, that won't work.  You need to create a system DSN.  Here's what I did to
create one.  My PC is running Windows XP Professional and I am using Apache
1.3.27.

* opened up the control panel

* double-clicked Administrative Tools

* double-clicked Data Sources (ODBC)

* clicked on the System DSN tab

* clicked Add...

* selected Microsoft Access Driver (*.mdb) from the list

* clicked Finish

* typed mctadb in Data Source Name

* clicked on Select...

* selected the MS Access database I wanted to connect to and clicked OK

* clicked on Advance...

* typed in a Login name then clicked OK

* clicked OK in the next 2 windows


I could use some help as well.  I get connected to the database but get an
error when I try to execute a SQL statement on it.

The error message I get is:

Warning: odbc_exec(): supplied argument is not a valid ODBC-Link resource in
c:\program files\apache group\apache\htdocs\test2.php on line 30
cannot prepare result


Does anyone know what might be missing?  Here's the code from test2.php:

$connection = odbc_connect("mctadb", "admin", "") || die("cannot open
database");

$sql = "SELECT * FROM Meeting";

$result = odbc_exec($connection, $sql) || die("cannot prepare result");

--
Beverly Steiner
[EMAIL PROTECTED]


-Original Message-
From: Kiswa [mailto:[EMAIL PROTECTED]
Sent: Friday, March 07, 2003 3:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] ODBC


Hi.
Is their anyway to connect to a Access Db using only the filesystem like

$connect = odbc_connect("\Db\Webdb.mdb", "nobody", "nobody");

thus pointing directly to the file not using drivers???



--
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

2003-03-07 Thread Kiswa
Hi.
Is their anyway to connect to a Access Db using only the filesystem like

$connect = odbc_connect("\Db\Webdb.mdb", "nobody", "nobody");

thus pointing directly to the file not using drivers???



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



[PHP-DB] ODBC/Paradox

2003-03-05 Thread Fabio Hur
Hi,

I am trying access DB Paradox via php/odbc.
Only get in W98/PWS or WME/PWS. And without success in Linux/php/odbc and
Windows 2K/php/odbc.
In W2K's Case, it appears following message:

Warning: SQL error: [Microsoft][ODBC DRIVER for Paradox] The table
external is not in the waited format., SQL state S1000 in
SQLExecDirect in D:\www\chen\quadro.inc on line 4
Unable have runs query.

Would anybody have a solution?

Thanks

Fábio Hur



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



RE: [PHP-DB] ODBC Timout for MS SQL Driver

2003-03-03 Thread Ryan Jameson (USA)
Ok I tried this another way but using the ms sql functions along with:

ini_set("mssql.timeout",2);
ini_set("mssql.connect_timeout",2);

... no change, it still takes about 7-8 seconds to decide it couldn't connect.

<>< Ryan

-Original Message-
From: Ryan Jameson (USA) 
Sent: Monday, March 03, 2003 11:01 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] ODBC Timout for MS SQL Driver


Does anyone know a reliable way to set an ODBC connection to timeout after a very 
short time? I've tried set_time_limit but when the query is running PHP does not drop 
out, I've also tried odbc_setoption on the connection before executing. Basically, I 
want it to just fail quicker if it is going to. 30 seconds is too long.

<>< Ryan

Ryan Jameson
Software Development Services Manager 
International Bible Society
W (719) 867-2692

-- 
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 Timout for MS SQL Driver

2003-03-03 Thread Ryan Jameson (USA)
Does anyone know a reliable way to set an ODBC connection to timeout after a very 
short time? I've tried set_time_limit but when the query is running PHP does not drop 
out, I've also tried odbc_setoption on the connection before executing. Basically, I 
want it to just fail quicker if it is going to. 30 seconds is too long.

<>< Ryan

Ryan Jameson
Software Development Services Manager 
International Bible Society
W (719) 867-2692

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



[PHP-DB] ODBC Stored Procedure

2003-02-26 Thread Renato Preti
Hi all,

I have a system PHP4+LINUX+DB2. I'm using stored procedure on IBM DB2 7.1,
and in PHP(4.23) I can execute the procedure but I can't get the return
values. Does anyone know why? Below is my source code.

Thank you,

Renato Preti


$result=odbc_prepare($conn,"{CALL DSMTD.S6S006(?,?)}");
$par[0]=$pim.$num_rand;
$par[1]='
';

if(!odbc_execute($result,&$par))
  print("The odbc statement failed to execute! ");

print_r($par);


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



RE: [PHP-DB] odbc query with single quote in string

2003-02-05 Thread Squirrel User
The 1st one didn't work, but the 2nd one did work.  Fantastic!  Thanks alot, 
you saved me from frustrations.

Quoting "John W. Holmes" <[EMAIL PROTECTED]>:

> > I'm having problem querying a table with a field value containing an
> > appostropy, please help.  Using ODBC to connect MSAcess database.
> > 
> >$mQuery = "CustomerID='$mCust'";
> >$mCur2 = odbc_do( $mCnx, "select Login from Emails where $mQuery"
> );
> > 
> > When it hits "O'Donald, James", I get error in odbc_exec().  I tried
> > variations of $mQuery, including:
> > 
> >$mQuery = addslashes( $mQuery );
> 
> You don't want to use addslashes() on $mQuery, you want to use it on the
> data you're inserting between the quotes, i.e. $mCust. 
> 
> $mQuery = "CustomerID='" . addslashes($mCust) . "'";
> 
> If that still causes an error, your database may require quotes to be
> escaped with another quote, instead of a backslash. In that case, you
> can create a function like this
> 
> function addslashes2($data)
> { return str_replace("'","''",$data); }
> 
> Hope that helps.  
> 
> ---John W. Holmes...
> 
> PHP Architect - A monthly magazine for PHP Professionals. Get your copy
> today. http://www.phparch.com/
> 
> 
> 




-
This mail sent through ISOT.  To find out more 
about ISOT, visit http://isot.com

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




RE: [PHP-DB] odbc query with single quote in string

2003-02-04 Thread John W. Holmes
> I'm having problem querying a table with a field value containing an
> appostropy, please help.  Using ODBC to connect MSAcess database.
> 
>$mQuery = "CustomerID='$mCust'";
>$mCur2 = odbc_do( $mCnx, "select Login from Emails where $mQuery"
);
> 
> When it hits "O'Donald, James", I get error in odbc_exec().  I tried
> variations of $mQuery, including:
> 
>$mQuery = addslashes( $mQuery );

You don't want to use addslashes() on $mQuery, you want to use it on the
data you're inserting between the quotes, i.e. $mCust. 

$mQuery = "CustomerID='" . addslashes($mCust) . "'";

If that still causes an error, your database may require quotes to be
escaped with another quote, instead of a backslash. In that case, you
can create a function like this

function addslashes2($data)
{ return str_replace("'","''",$data); }

Hope that helps.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




[PHP-DB] odbc query with single quote in string

2003-02-04 Thread Squirrel User
I'm having problem querying a table with a field value containing an 
appostropy, please help.  Using ODBC to connect MSAcess database.

   $mQuery = "CustomerID='$mCust'";
   $mCur2 = odbc_do( $mCnx, "select Login from Emails where $mQuery" );

When it hits "O'Donald, James", I get error in odbc_exec().  I tried 
variations of $mQuery, including:

   $mQuery = addslashes( $mQuery );

-
This mail sent through ISOT.  To find out more 
about ISOT, visit http://isot.com

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




[PHP-DB] ODBC error...please help

2002-12-02 Thread Radim Klasek
Does anybody know, what does it mean:

SQL error: [Microsoft][ODBC Visual FoxPro Driver]File 'datum_format.prg' does not 
exist., SQL state S0002 in SQLExecDirect 

I'm using DATUM_FORMAT function in SQL command and this error is shown.

Thank you, Radim



[PHP-DB] odbc under windows

2002-11-29 Thread Hacook
Hi all,
I have an apache server with PHP 4.2.3 on it that works perfectly.
How can i install the odbc drivers ?
Thanks,
Hacook



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




[PHP-DB] ODBC,PHP and LINUX

2002-11-28 Thread Radim Klasek
Hi  i need advice

I want to run my PHP script on Linux, but i want to use FoxPro database
(.dbf) through ODBC.
I didn't find such ODBC driver for Linux and i don't know how to connect
with the script to the some machine with Windows system,where the data are
stored and where ODBC is working.
Can someone help me please?
Thanx, Radim





[PHP-DB] ODBC?

2002-09-24 Thread Chris Payne

Hi there everyone,

I have always used MySQL with PHP without any problems using the standard MySQL 
connection functionality.  Is it possible to connect to a MySQL DB via ODBC?   If so, 
what would the PHP Connection string be?  I am curious as my email server allows you 
to use external databases for users accounts and I figure this way I could write a PHP 
script to control users email accounts.

Thanks everyone, sorry if this sounds like a stupid question, not used ODBC before so 
even though I know quite abit about PHP/MySQL, I know diddly about ODBC :-)

Chris Payne


[PHP-DB] ODBC text driver problem

2002-09-10 Thread Ethan Nelson

Hello,

I'm having trouble connecting via ODBC using the Microsoft text driver on a win2k box. 
 I read the KB article at 
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q178717 and it seems to 
suggest that I should be able to select data from a text source.  Here is what I have 
so far:

odbc_close_all();

$odbc = odbc_connect("cvalcoinput","","") OR die("There is an error connecting to the 
CSV file.");
$result = odbc_tables($odbc);

odbc_fetch_into($result, $fields)
print_r($fields);
-
unset($fields);
$result = odbc_exec($odbc,"SELECT * from inputfile.txt");

odbc_fetch_into($result, $fields)
print_r($fields);

The connection and following tables commands work great, but when I actually select 
data via the odbc_exec command, I get the following error:

Warning: SQL error: [Microsoft][ODBC Text Driver] The Microsoft Jet database engine \
cannot open the file '(unknown)'. It is already opened exclusively by another user, \
or you need permission to view its data., SQL state S1000 in SQLExecDirect in \
***:\***\***\***\basecsv2.html on line 53

Any ideas?

-Ethan, Modulus, LLC

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




[PHP-DB] odbc data sort problem (i think) :)

2002-08-29 Thread Lukas Boldrino

hey guys !

I´m trying to use a if syntax to compare data and preselect radiobuttons.
I tried it like that:

if ($checked == "Patch")
$checked6 = "bla";

With numbers it works great but with char my $checked6 variable is empty !
I know php is case sensitive and I´m sure that problem is not the "case
sensitive"
so please help, im using a MS SQL Server 2000 (enterprise edition) and the
odbc driver!

thanks guys!

-
[EMAIL PROTECTED]
-



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




[PHP-DB] odbc function return values

2002-08-16 Thread Kevin Gordon

resource *odbc_primarykeys* ( resource connection_id, string qualifier, 
string owner, string table)

resource *odbc_foreignkeys* ( resource connection_id, string 
pk_qualifier, string pk_owner, string pk_table, string fk_qualifier, 
string fk_owner, string fk_table)

int *odbc_tables* ( resource connection_id [, string qualifier [, string 
owner [, string name [, string types)

int *odbc_tableprivileges* ( resource connection_id [, string qualifier 
[, string owner [, string name]]])

The first two functions return "resource" and the second two functions 
return "int". Is there any difference?  

Using a postgresql database odbc_tables works fine. But with 
odbc_primarykeys I can not find a result.

Any advice would be appreciated.

Kevin


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




Re: [PHP-DB] odbc connect problem

2002-08-13 Thread salamander

Hi Chip,

Looks okay at first brush - I suspect your odbc.ini DSN config.
Have you been able to test your DSN outside the PHP environment?  e.g 
with the odbctest app that comes with iODBC?

Can you post your odbc.ini / DSN info?

> Warning: SQL error: [iODBC][Driver Manager]Specified driver could not be
> loaded, SQL state IM003 in
> SQLConnect in /usr/local/apache/htdocs/odbctest.php on line 16

My suspicions come from the test of this error - "could not be loaded" - 
so it's possible that your are specifying an invalid file, or there are 
permission issues on that file, etc.. either way, the contents of your 
odbc.ini might help.

Cheers,
Andrew


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




Re: [PHP-DB] odbc connect problem

2002-08-12 Thread chip . wiegand


salamander <[EMAIL PROTECTED]> wrote on 08/09/2002 04:31:35 PM:

> Chip,

> I wonder if you set the ODBCINI environment variable with the putenv()?

Yep, they are there and I am getting this error when attempting to load the
web page -

Warning: SQL error: [iODBC][Driver Manager]Specified driver could not be
loaded, SQL state IM003 in
SQLConnect in /usr/local/apache/htdocs/odbctest.php on line 16

Warning: odbc_exec(): supplied argument is not a valid ODBC-Link resource
in
/usr/local/apache/htdocs/odbctest.php on line 19

Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result
resource in
/usr/local/apache/htdocs/odbctest.php on line 22

> If you could show the code in your odbctest.php file that would be
> helpful.

The output from /usr/local/bin/iodbc-odbctest

[iodbc][driver manager]dialog failed, SQLSTATE=IM003

> Andrew Hill

Below is the code of the odbctest.php file I am trying to use:


Untitled
Brand
 Part NumberDescription\n";
// fetch the succesive result rows
while( odbc_fetch_row( $result ) ) {
$brand= odbc_result( $result, 1 ); // get the field
"ProductLineDescription"
$number= odbc_result( $result, 2 ); // get the field "ItemNumber"
$description= odbc_result( $result, 3 ); // get the field
"ItemDescription"
echo "$brand$number$description
\n";
 }
 echo "";
 echo "";
?>

--
Chip


> On Friday, August 9, 2002, at 07:31 PM, [EMAIL PROTECTED] wrote:

> >
> > Thanks, that fixed that part of it, now here's the newest error
message:
> >
> >
> > Warning: SQL error: [iODBC][Driver Manager]Specified driver could not
be
> > loaded, SQL
> > state IM003 in SQLConnect in /usr/local/apache/htdocs/odbctest.php on
> > line
> > 7
> >
> > Fatal error: Call to undefined function: error_handler() in
> > /usr/local/apache/htdocs/odbctest.php
> > on line 10
> >
> > I'm outa here, catch up with ya on monday,
> >
> > --
> > Chip
> >
> > salamander <[EMAIL PROTECTED]> wrote on 08/09/2002 04:10:00 PM:
> >
> >> Chip,
> >
> >> You are going to have to rebuild the dso with the options you
specified
> >> before - try cutting and pasting the configure that shows up in your
> >> phpinfo() to make it easier.
> >
> >> Also, you can get the necessary iODBC header files at www.iodbc.org,
as
> >> well as find a HOWTO there for compiling PHP/iODBC on *nix systems.
> >
> >> Cheers,
> >> Andrew
> >
> >> On Friday, August 9, 2002, at 06:08 PM, [EMAIL PROTECTED] wrote:
> >
> >>> Yeah, you're right, I see I need to add --with-iodbc. Now another
> >>> question
> >>> - when I recompile to add
> >>> this support, do I have to add all the other options that I
originally
> >>> had
> >>> listed? Or can I add just this one
> >>> and everything else will be left the same? What about php.ini? Will
it
> >>> be
> >>> changed?
> >>>
> >>> --
> >>> Chip W
> >>>
> >>> Chip Atkinson <[EMAIL PROTECTED]> wrote on 08/09/2002 02:51:10
> > PM:
> >>>
>  It looks like you didn't build php with odbc support.
>  Try putting in a call to
>  phpinfo ();
>  and see if it says that odbc support is compiled in.
> >>>
>  (Another) Chip
> >>>
>  On Fri, 9 Aug 2002 [EMAIL PROTECTED] wrote:
> >>>
> > I am attempting for the first time, to connect from
> > freebsd/mysql/php
> >>> box
> > to a NT box running MAS200. I am able
> > to connect from another NT workstation with Access and download
> > data,
> >>> so I
> > am trying from FreeBSD now.
> > When I run the code below I get error:
> >
> > Fatal error: Call to undefined function: odbc_connect() in
> > /usr/local/apache/htdocs/odbctest.php on line 7
> >
> > What am I doing wrong? There's not much info on this topic in the
> > mysql
> > manual.
> >
> > 
> > 
> > Untitled
> > 
> > 
> >  > $connect = odbc_connect("localhost", "", "-");
> >  if (!$connect)
> >  {
> >Error_handler( "Error in odbc_connect" , $connect );
> >  }
> > $result = odbc_exec($connect, "SELECT ProductLineDescription FROM
> > IMA_ProductLine, ItemNumber,
> > ItemDescription FROM IM1_InventoryMasterFile where DefaultWhse =
> > 004");
> > if (!$result) {
> > Error_handler( "Error in odbc_exec( no cursor returned ) "
,
> > $connect );
> > }
> > echo "BrandPart
> > NumberDescription\n";
> >
> > // fetch the succesive result rows
> > while( odbc_fetch_row( $result ) ) {
> > $brand= odbc_result( $result, 1 ); // get the field
> > "ProductLineDescription"
> > $number= odbc_result( $result, 2 ); // get the field
> >>> "ItemNumber"
> > $description= odbc_result( $result, 3 ); // get the field
> > "ItemDescription"
> >
> >
> > echo
> >>> "$brand$number$description
> > \n";
> > }
> >
> > echo "";
> >  echo "";
> > ?>
> >
> > --
> > Chip Wiegand
> > Compute

Re: [PHP-DB] odbc connect problem

2002-08-09 Thread salamander

Chip,

I wonder if you set the ODBCINI environment variable with the putenv()?
If you could show the code in your odbctest.php file that would be 
helpful.

Actually, I'll be traveling to Linuxworld on Monday - anyone wants to 
chat about ODBC who will be there feel free to drop me an email.

Cheers,
Andrew Hill
OpenLink Software

On Friday, August 9, 2002, at 07:31 PM, [EMAIL PROTECTED] wrote:

>
> Thanks, that fixed that part of it, now here's the newest error message:
>
>
> Warning: SQL error: [iODBC][Driver Manager]Specified driver could not be
> loaded, SQL
> state IM003 in SQLConnect in /usr/local/apache/htdocs/odbctest.php on 
> line
> 7
>
> Fatal error: Call to undefined function: error_handler() in
> /usr/local/apache/htdocs/odbctest.php
> on line 10
>
> I'm outa here, catch up with ya on monday,
>
> --
> Chip
>
> salamander <[EMAIL PROTECTED]> wrote on 08/09/2002 04:10:00 PM:
>
>> Chip,
>
>> You are going to have to rebuild the dso with the options you specified
>> before - try cutting and pasting the configure that shows up in your
>> phpinfo() to make it easier.
>
>> Also, you can get the necessary iODBC header files at www.iodbc.org, as
>> well as find a HOWTO there for compiling PHP/iODBC on *nix systems.
>
>> Cheers,
>> Andrew
>
>> On Friday, August 9, 2002, at 06:08 PM, [EMAIL PROTECTED] wrote:
>
>>> Yeah, you're right, I see I need to add --with-iodbc. Now another
>>> question
>>> - when I recompile to add
>>> this support, do I have to add all the other options that I originally
>>> had
>>> listed? Or can I add just this one
>>> and everything else will be left the same? What about php.ini? Will it
>>> be
>>> changed?
>>>
>>> --
>>> Chip W
>>>
>>> Chip Atkinson <[EMAIL PROTECTED]> wrote on 08/09/2002 02:51:10
> PM:
>>>
 It looks like you didn't build php with odbc support.
 Try putting in a call to
 phpinfo ();
 and see if it says that odbc support is compiled in.
>>>
 (Another) Chip
>>>
 On Fri, 9 Aug 2002 [EMAIL PROTECTED] wrote:
>>>
> I am attempting for the first time, to connect from 
> freebsd/mysql/php
>>> box
> to a NT box running MAS200. I am able
> to connect from another NT workstation with Access and download 
> data,
>>> so I
> am trying from FreeBSD now.
> When I run the code below I get error:
>
> Fatal error: Call to undefined function: odbc_connect() in
> /usr/local/apache/htdocs/odbctest.php on line 7
>
> What am I doing wrong? There's not much info on this topic in the
> mysql
> manual.
>
> 
> 
> Untitled
> 
> 
>  $connect = odbc_connect("localhost", "", "-");
>  if (!$connect)
>  {
>Error_handler( "Error in odbc_connect" , $connect );
>  }
> $result = odbc_exec($connect, "SELECT ProductLineDescription FROM
> IMA_ProductLine, ItemNumber,
> ItemDescription FROM IM1_InventoryMasterFile where DefaultWhse =
> 004");
> if (!$result) {
> Error_handler( "Error in odbc_exec( no cursor returned ) " ,
> $connect );
> }
> echo "BrandPart
> NumberDescription\n";
>
> // fetch the succesive result rows
> while( odbc_fetch_row( $result ) ) {
> $brand= odbc_result( $result, 1 ); // get the field
> "ProductLineDescription"
> $number= odbc_result( $result, 2 ); // get the field
>>> "ItemNumber"
> $description= odbc_result( $result, 3 ); // get the field
> "ItemDescription"
>
>
> echo
>>> "$brand$number$description
> \n";
> }
>
> echo "";
>  echo "";
> ?>
>
> --
> Chip Wiegand
> Computer Services
> Simrad, Inc
> www.simradusa.com
> [EMAIL PROTECTED]
>
> "There is no reason anyone would want a computer in their home."
>  --Ken Olson, president, chairman and founder of Digital
> Equipment
> Corporation, 1977
>  (They why do I have 9? Somebody help me!)
>
>
> --
> 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 Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] odbc connect problem

2002-08-09 Thread chip . wiegand


Thanks, that fixed that part of it, now here's the newest error message:


Warning: SQL error: [iODBC][Driver Manager]Specified driver could not be
loaded, SQL
state IM003 in SQLConnect in /usr/local/apache/htdocs/odbctest.php on line
7

Fatal error: Call to undefined function: error_handler() in
/usr/local/apache/htdocs/odbctest.php
on line 10

I'm outa here, catch up with ya on monday,

--
Chip

salamander <[EMAIL PROTECTED]> wrote on 08/09/2002 04:10:00 PM:

> Chip,

> You are going to have to rebuild the dso with the options you specified
> before - try cutting and pasting the configure that shows up in your
> phpinfo() to make it easier.

> Also, you can get the necessary iODBC header files at www.iodbc.org, as
> well as find a HOWTO there for compiling PHP/iODBC on *nix systems.

> Cheers,
> Andrew

> On Friday, August 9, 2002, at 06:08 PM, [EMAIL PROTECTED] wrote:

> > Yeah, you're right, I see I need to add --with-iodbc. Now another
> > question
> > - when I recompile to add
> > this support, do I have to add all the other options that I originally
> > had
> > listed? Or can I add just this one
> > and everything else will be left the same? What about php.ini? Will it
> > be
> > changed?
> >
> > --
> > Chip W
> >
> > Chip Atkinson <[EMAIL PROTECTED]> wrote on 08/09/2002 02:51:10
PM:
> >
> >> It looks like you didn't build php with odbc support.
> >> Try putting in a call to
> >> phpinfo ();
> >> and see if it says that odbc support is compiled in.
> >
> >> (Another) Chip
> >
> >> On Fri, 9 Aug 2002 [EMAIL PROTECTED] wrote:
> >
> >>> I am attempting for the first time, to connect from freebsd/mysql/php
> > box
> >>> to a NT box running MAS200. I am able
> >>> to connect from another NT workstation with Access and download data,
> > so I
> >>> am trying from FreeBSD now.
> >>> When I run the code below I get error:
> >>>
> >>> Fatal error: Call to undefined function: odbc_connect() in
> >>> /usr/local/apache/htdocs/odbctest.php on line 7
> >>>
> >>> What am I doing wrong? There's not much info on this topic in the
> >>> mysql
> >>> manual.
> >>>
> >>> 
> >>> 
> >>> Untitled
> >>> 
> >>> 
> >>>  >>> $connect = odbc_connect("localhost", "", "-");
> >>>  if (!$connect)
> >>>  {
> >>>Error_handler( "Error in odbc_connect" , $connect );
> >>>  }
> >>> $result = odbc_exec($connect, "SELECT ProductLineDescription FROM
> >>> IMA_ProductLine, ItemNumber,
> >>> ItemDescription FROM IM1_InventoryMasterFile where DefaultWhse =
> >>> 004");
> >>> if (!$result) {
> >>> Error_handler( "Error in odbc_exec( no cursor returned ) " ,
> >>> $connect );
> >>> }
> >>> echo "BrandPart
> >>> NumberDescription\n";
> >>>
> >>> // fetch the succesive result rows
> >>> while( odbc_fetch_row( $result ) ) {
> >>> $brand= odbc_result( $result, 1 ); // get the field
> >>> "ProductLineDescription"
> >>> $number= odbc_result( $result, 2 ); // get the field
> > "ItemNumber"
> >>> $description= odbc_result( $result, 3 ); // get the field
> >>> "ItemDescription"
> >>>
> >>>
> >>> echo
> > "$brand$number$description
> >>> \n";
> >>> }
> >>>
> >>> echo "";
> >>>  echo "";
> >>> ?>
> >>>
> >>> --
> >>> Chip Wiegand
> >>> Computer Services
> >>> Simrad, Inc
> >>> www.simradusa.com
> >>> [EMAIL PROTECTED]
> >>>
> >>> "There is no reason anyone would want a computer in their home."
> >>>  --Ken Olson, president, chairman and founder of Digital
Equipment
> >>> Corporation, 1977
> >>>  (They why do I have 9? Somebody help me!)
> >>>
> >>>
> >>> --
> >>> 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 connect problem

2002-08-09 Thread salamander

Chip,

You are going to have to rebuild the dso with the options you specified 
before - try cutting and pasting the configure that shows up in your 
phpinfo() to make it easier.

Also, you can get the necessary iODBC header files at www.iodbc.org, as 
well as find a HOWTO there for compiling PHP/iODBC on *nix systems.

Cheers,
Andrew

On Friday, August 9, 2002, at 06:08 PM, [EMAIL PROTECTED] wrote:

> Yeah, you're right, I see I need to add --with-iodbc. Now another 
> question
> - when I recompile to add
> this support, do I have to add all the other options that I originally 
> had
> listed? Or can I add just this one
> and everything else will be left the same? What about php.ini? Will it 
> be
> changed?
>
> --
> Chip W
>
> Chip Atkinson <[EMAIL PROTECTED]> wrote on 08/09/2002 02:51:10 PM:
>
>> It looks like you didn't build php with odbc support.
>> Try putting in a call to
>> phpinfo ();
>> and see if it says that odbc support is compiled in.
>
>> (Another) Chip
>
>> On Fri, 9 Aug 2002 [EMAIL PROTECTED] wrote:
>
>>> I am attempting for the first time, to connect from freebsd/mysql/php
> box
>>> to a NT box running MAS200. I am able
>>> to connect from another NT workstation with Access and download data,
> so I
>>> am trying from FreeBSD now.
>>> When I run the code below I get error:
>>>
>>> Fatal error: Call to undefined function: odbc_connect() in
>>> /usr/local/apache/htdocs/odbctest.php on line 7
>>>
>>> What am I doing wrong? There's not much info on this topic in the 
>>> mysql
>>> manual.
>>>
>>> 
>>> 
>>> Untitled
>>> 
>>> 
>>> >> $connect = odbc_connect("localhost", "", "-");
>>>  if (!$connect)
>>>  {
>>>Error_handler( "Error in odbc_connect" , $connect );
>>>  }
>>> $result = odbc_exec($connect, "SELECT ProductLineDescription FROM
>>> IMA_ProductLine, ItemNumber,
>>> ItemDescription FROM IM1_InventoryMasterFile where DefaultWhse = 
>>> 004");
>>> if (!$result) {
>>> Error_handler( "Error in odbc_exec( no cursor returned ) " ,
>>> $connect );
>>> }
>>> echo "BrandPart
>>> NumberDescription\n";
>>>
>>> // fetch the succesive result rows
>>> while( odbc_fetch_row( $result ) ) {
>>> $brand= odbc_result( $result, 1 ); // get the field
>>> "ProductLineDescription"
>>> $number= odbc_result( $result, 2 ); // get the field
> "ItemNumber"
>>> $description= odbc_result( $result, 3 ); // get the field
>>> "ItemDescription"
>>>
>>>
>>> echo
> "$brand$number$description
>>> \n";
>>> }
>>>
>>> echo "";
>>>  echo "";
>>> ?>
>>>
>>> --
>>> Chip Wiegand
>>> Computer Services
>>> Simrad, Inc
>>> www.simradusa.com
>>> [EMAIL PROTECTED]
>>>
>>> "There is no reason anyone would want a computer in their home."
>>>  --Ken Olson, president, chairman and founder of Digital Equipment
>>> Corporation, 1977
>>>  (They why do I have 9? Somebody help me!)
>>>
>>>
>>> --
>>> 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 connect problem

2002-08-09 Thread chip . wiegand

Yeah, you're right, I see I need to add --with-iodbc. Now another question
- when I recompile to add
this support, do I have to add all the other options that I originally had
listed? Or can I add just this one
and everything else will be left the same? What about php.ini? Will it be
changed?

--
Chip W

Chip Atkinson <[EMAIL PROTECTED]> wrote on 08/09/2002 02:51:10 PM:

> It looks like you didn't build php with odbc support.
> Try putting in a call to
> phpinfo ();
> and see if it says that odbc support is compiled in.

> (Another) Chip

> On Fri, 9 Aug 2002 [EMAIL PROTECTED] wrote:

> > I am attempting for the first time, to connect from freebsd/mysql/php
box
> > to a NT box running MAS200. I am able
> > to connect from another NT workstation with Access and download data,
so I
> > am trying from FreeBSD now.
> > When I run the code below I get error:
> >
> > Fatal error: Call to undefined function: odbc_connect() in
> > /usr/local/apache/htdocs/odbctest.php on line 7
> >
> > What am I doing wrong? There's not much info on this topic in the mysql
> > manual.
> >
> > 
> > 
> > Untitled
> > 
> > 
> >  > $connect = odbc_connect("localhost", "", "-");
> >  if (!$connect)
> >  {
> >Error_handler( "Error in odbc_connect" , $connect );
> >  }
> > $result = odbc_exec($connect, "SELECT ProductLineDescription FROM
> > IMA_ProductLine, ItemNumber,
> > ItemDescription FROM IM1_InventoryMasterFile where DefaultWhse = 004");
> > if (!$result) {
> > Error_handler( "Error in odbc_exec( no cursor returned ) " ,
> > $connect );
> > }
> > echo "BrandPart
> > NumberDescription\n";
> >
> > // fetch the succesive result rows
> > while( odbc_fetch_row( $result ) ) {
> > $brand= odbc_result( $result, 1 ); // get the field
> > "ProductLineDescription"
> > $number= odbc_result( $result, 2 ); // get the field
"ItemNumber"
> > $description= odbc_result( $result, 3 ); // get the field
> > "ItemDescription"
> >
> >
> > echo
"$brand$number$description
> > \n";
> > }
> >
> > echo "";
> >  echo "";
> > ?>
> >
> > --
> > Chip Wiegand
> > Computer Services
> > Simrad, Inc
> > www.simradusa.com
> > [EMAIL PROTECTED]
> >
> > "There is no reason anyone would want a computer in their home."
> >  --Ken Olson, president, chairman and founder of Digital Equipment
> > Corporation, 1977
> >  (They why do I have 9? Somebody help me!)
> >
> >
> > --
> > 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 connect problem

2002-08-09 Thread Chip Atkinson

It looks like you didn't build php with odbc support.
Try putting in a call to
phpinfo ();
and see if it says that odbc support is compiled in.

(Another) Chip

On Fri, 9 Aug 2002 [EMAIL PROTECTED] wrote:

> I am attempting for the first time, to connect from freebsd/mysql/php box
> to a NT box running MAS200. I am able
> to connect from another NT workstation with Access and download data, so I
> am trying from FreeBSD now.
> When I run the code below I get error:
>
> Fatal error: Call to undefined function: odbc_connect() in
> /usr/local/apache/htdocs/odbctest.php on line 7
>
> What am I doing wrong? There's not much info on this topic in the mysql
> manual.
>
> 
> 
> Untitled
> 
> 
>  $connect = odbc_connect("localhost", "", "-");
>  if (!$connect)
>  {
>Error_handler( "Error in odbc_connect" , $connect );
>  }
> $result = odbc_exec($connect, "SELECT ProductLineDescription FROM
> IMA_ProductLine, ItemNumber,
> ItemDescription FROM IM1_InventoryMasterFile where DefaultWhse = 004");
> if (!$result) {
> Error_handler( "Error in odbc_exec( no cursor returned ) " ,
> $connect );
> }
> echo "BrandPart
> NumberDescription\n";
>
> // fetch the succesive result rows
> while( odbc_fetch_row( $result ) ) {
> $brand= odbc_result( $result, 1 ); // get the field
> "ProductLineDescription"
> $number= odbc_result( $result, 2 ); // get the field "ItemNumber"
> $description= odbc_result( $result, 3 ); // get the field
> "ItemDescription"
>
>
> echo "$brand$number$description
> \n";
> }
>
> echo "";
>  echo "";
> ?>
>
> --
> Chip Wiegand
> Computer Services
> Simrad, Inc
> www.simradusa.com
> [EMAIL PROTECTED]
>
> "There is no reason anyone would want a computer in their home."
>  --Ken Olson, president, chairman and founder of Digital Equipment
> Corporation, 1977
>  (They why do I have 9? Somebody help me!)
>
>
> --
> 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 connect problem

2002-08-09 Thread chip . wiegand

I am attempting for the first time, to connect from freebsd/mysql/php box
to a NT box running MAS200. I am able
to connect from another NT workstation with Access and download data, so I
am trying from FreeBSD now.
When I run the code below I get error:

Fatal error: Call to undefined function: odbc_connect() in
/usr/local/apache/htdocs/odbctest.php on line 7

What am I doing wrong? There's not much info on this topic in the mysql
manual.



Untitled


BrandPart
NumberDescription\n";

// fetch the succesive result rows
while( odbc_fetch_row( $result ) ) {
$brand= odbc_result( $result, 1 ); // get the field
"ProductLineDescription"
$number= odbc_result( $result, 2 ); // get the field "ItemNumber"
$description= odbc_result( $result, 3 ); // get the field
"ItemDescription"


echo "$brand$number$description
\n";
}

echo "";
 echo "";
?>

--
Chip Wiegand
Computer Services
Simrad, Inc
www.simradusa.com
[EMAIL PROTECTED]

"There is no reason anyone would want a computer in their home."
 --Ken Olson, president, chairman and founder of Digital Equipment
Corporation, 1977
 (They why do I have 9? Somebody help me!)


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




Re: [PHP-DB] odbc and primary key

2002-07-23 Thread salamander

Jaz,

http://www.php.net/manual/en/function.odbc-primarykeys.php

Best regards,
Andrew Hill

On Wednesday, July 17, 2002, at 08:16 AM, j.a.z. wrote:

> How can i get the information if a field on a database (in my case
> Access2000) is primary key via a php-odbc-function?
> or does i have to use sql for that?
> thanx j.a.z.
>
>
>
> --
> 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 and primary key

2002-07-17 Thread j.a.z.

How can i get the information if a field on a database (in my case
Access2000) is primary key via a php-odbc-function?
or does i have to use sql for that?
thanx j.a.z.



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




[PHP-DB] odbc into associative arrays

2002-07-16 Thread Gabor Niederlaender

Hi all!


Is it possible to fetch the odbc results into an associative array?

Regards,
Gabor

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




[PHP-DB] odbc and primary key

2002-07-10 Thread j.a.z.

How can i get the information if a field on a database (in my case
Access2000) is primary key via a php-odbc-function?
or does i have to use sql for that?
thanx j.a.z.



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




RE: [PHP-DB] ODBC Remote

2002-05-06 Thread Ryan Jameson (USA)

Try copying your .mdb to a new file and opening that one. I've seen this before. It 
really has nothing to do with PHP, it's a microsoft issue.

<>< Ryan

-Original Message-
From: Juan Angel Ringhetti [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 2:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] ODBC Remote



Hi,

I have an app developed with PHP+Apache+MySQL on a NT Server, but I have
data in a MSAccess file on a another LAN server (with NT) that I want to
display.

The response is always the same:

Warning: SQL error: [Microsoft][Controlador ODBC Microsoft Access 97] The
Microsoft Jet database engine cannot open the file '(desconocido)'. It is
already opened exclusively by another user, or you need permission to view
its data., SQL state S1000 in SQLConnect in file-example.php on line 15

I've been modified the permissions without succesfull.

Anyone can help me?

Thanks in advance

Juan



-- 
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 Remote

2002-05-06 Thread Juan Angel Ringhetti


Hi,

I have an app developed with PHP+Apache+MySQL on a NT Server, but I have
data in a MSAccess file on a another LAN server (with NT) that I want to
display.

The response is always the same:

Warning: SQL error: [Microsoft][Controlador ODBC Microsoft Access 97] The
Microsoft Jet database engine cannot open the file '(desconocido)'. It is
already opened exclusively by another user, or you need permission to view
its data., SQL state S1000 in SQLConnect in file-example.php on line 15

I've been modified the permissions without succesfull.

Anyone can help me?

Thanks in advance

Juan



-- 
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

2002-04-30 Thread John Lim

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 :



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

2002-04-30 Thread Ryan Jameson (USA)


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 :



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

2002-04-30 Thread Manuel Lemos

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

2002-04-30 Thread John Lim

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 :



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

2002-04-29 Thread Ryan Jameson (USA)

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 :



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

2002-04-29 Thread Ryan Jameson (USA)


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 :



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-DB] ODBC problem in 4.2.0

2002-04-29 Thread Mihai Tache

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 :



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-DB] ODBC problems in PHP 4.2

2002-04-24 Thread Ryan Jameson (USA)

If this is easy for anyone could someone verify that:

odbc_fetch_row($rs,0);  

...does not reset the result set in version 4.2? From what I can tell it doesn't work 
at all. I want to be certain that we cannot upgrade to 4.2. If someone has another way 
to reset an ODBC result set I'd love to hear about it. It's done in a central core 
function, but is necessary in a plethora of scripts. The result set comes from the MS 
SQL Server driver.
Thanks!

<>< Ryan

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




[PHP-DB] odbc versions

2002-04-17 Thread Steve Cayford

Hi. I'm looking at compiling one of the odbc function sets into php on 
my Mac OSX machine (I eventually want to be able to talk to MAS90 on a 
Windows machine -- if that's feasible). I'm finding the ODBC situation a 
bit confusing though. Should I use iodbc or unixodbc? Any suggestions? 
And will a database driver for one work with the other or are they 
incompatible?

Thanks.

-Steve


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




[PHP-DB] odbc vs mysql

2002-04-02 Thread Maris Kalnins

When connecting to database (Sybase) through ODBC it takes some time to
establish odbc connection with:

$cx=odbc_pconnect($G_dbname, $G_dblogin, $G_dbpassw);

And only after that I am able to access data through SQL Selects

The problem is that every time the script is finished this connection is
automatically closed,
how to keep it open after displaying a page - no idea ...

How about using MySql in this situation?
There will be no need to waste time connecting to ODBC every time,
is it really so? could this be faster?

is there any idea how to keep ODBC connections open after script is
finished?

Any other solutions?

Thanks

P.S. I tried to use Sybase funcitons.. but it says - that they're not
defined or something like that..






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




Re: [PHP-DB] ODBC -- Setting ApplicationID

2002-03-26 Thread Bruce S. Garlock

I think that work-around may work for me.  Since I can declare a different
environment variable for the PHP script, with a new alias, that should work
fine.  Thanks for the suggestion.

- Bruce


Andrew Hill wrote:

> Bruce,
>
> It looks like you were on the right track initially, the problem is that PHP
> has a major bug - odbc_setoption is coded specific to ODBC statement handle
> (connection id), which means that trying to use odbc_setoption the way you
> want attempts to set a SQLSetConnectOption AFTER the connection is open -
> which is bogus and will give you ODBC function sequence errors.
>
> On the other hand, the error message you were getting is a bit misleading;
> we are fixing that now.
>
> So... you can unfortunately not do this via Application ID, but since you
> are using the OpenLink Rules Book, you can still affect Session-based
> connection management with any of the other connection criteria:
>
> Here is one way to do it:
> --
> Setup your session attributes by configuring the Session Rules Book Aliases
> section of the Multi-Tier OpenLink Admin Assistant.
> (http://servername:8000).
>
> You can configure session rules for any combination of Domain, Database,
> User, Operating System, Client Machine, Client Application, etc., and can
> control any connection options at the server side based on the session.
>
> Using "Database" as an example, add a Database Alias with a new database
> name and configure a session mapping rule to point to the original database
> name, but change the connection attributes from "Read / Write" to "Read
> Only" in the options for the  connection session.
>
> On the PHP side, simply choose between two DSN's in the odbc.ini - one is
> the "normal" DSN, with default settings, and one will have an alternate
> database name, "name_readonly" or somesuch, that will cause the oplrqb to
> instantiate the appropriate connection attributes.
>
> If you run into problems, you should probably open a support case at
> http://www.openlinksw.com/support/suppindx.htm, as this is getting somewhat
> off-topic for PHP.
>
> Hope this helps!
>
> Best regards,
> Andrew Hill
> Director of Technology Evangelism
> OpenLink Software  http://www.openlinksw.com
> Universal Data Access & Data Integration Technology Providers
>
> I was thinking of using the usernames, but as people come and go, that might
> mean messing around with the oplrqb.ini file too much.  I'd really like to
> do
> this based on application.  What variable do I pass with the PHP script?
> ( I'm
> not sure what you mean ).  Can I use a variable in PHP that passes the
> application name to the server?
>
> Thanks,
>
> Bruce
>
> Andrew Hill wrote:
>
> > Hi Bruce,
> >
> > The setoption error is being thrown because you cannot use
> > SQLSetConnectOption that way.
> > Passing arbitrary info to be used by your application isn't really what
> this
> > is for, but instead can be used to modify parameters in the ODBC API.
> >
> > This means you can modify things like SQL_ACCESS_MODE, SQL_AUTOCOMMIT,
> > SQL_ODBC_CURSORS, etc., (check the 2.x spec - there are several metadata
> > items that you can control with this API call.)
> >
> > I'd recommend you just pass a variable to your PHP script, and perhaps
> > change the username to a read-only/read-write user with  a case statement
> or
> > somesuch, based on the application.
> >
> > Again, I'd strongly recommend you upgrade the OpenLink UDA version as
> well;
> > 1.5 is something like 5 years old or more.
> >
> > Best regards,
> > Andrew Hill
> > Director of Technology Evangelism
> > http://www.openlinksw.com/virtuoso/whatis.htm
> > OpenLink Virtuoso Internet Data Integration Server
> >
> > > -Original Message-
> > > From: Bruce S. Garlock [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, March 25, 2002 10:48 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: [PHP-DB] ODBC -- Setting ApplicationID
> > >
> > >
> > > Sure, I'm simply trying to have PHP pass an ApplicationID to the
> > > ODBC server.
> > > When a PHP script access the ODBC database, it does not set the
> > > application:
> > >
> > > 10:46:04   connectopts= user=webuser opsys=unix machine=linux
> application=
> > >
> > > As you can see, application= is NULL.  I would like the script to pass
> > > something, so that my mapping rules on the server would allow
> > > write access to
> > >

  1   2   >