RE: ODBC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:l-koshrf@fercusoft.com]
> Sent: 14 October 2003 16:22
> To: php-db
> Subject: RE:  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:l-koshrf@fercusoft.com]
> > Sent: 14 October 2003 15:16
> > To: php-db@lists.php.net
> > Subject:  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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux