Re: FW: problem connecting w/ODBC

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

 



Use "or" rather than "||"


--- Beverly Steiner <steiner277@charter.net> wrote:
> Hello again,
> 
> Does anyone have suggestions about where I can get an answer to the
> problems
> I'm having with ODBC?  I've tried using:
> 	$cursor = odbc_cursor($connection) || die("cannot create cursor");
> 
> and get a similar error:
> 
> Warning: odbc_cursor(): supplied resource is not a valid ODBC
> result
> resource in c:\program files\apache group\apache\htdocs\test4.php
> on line 13
> cannot create cursor
> 
> Any help would be greatly appreciated.  I've been trying
> unsuccessfully to
> access to an MS Access database with PHP for weeks now.  Any ideas
> of where
> I can get the answer?  I have posted to the PHP-INST and PHP-DB
> lists.
> 
> ----------------------
> Beverly Steiner
> steiner277@charter.net
> 
> 
> -----Original Message-----
> From: Beverly Steiner [mailto:steiner277@charter.net]
> Sent: Friday, March 14, 2003 7:13 PM
> To: PHPDB
> Subject:  problem connecting w/ODBC
> 
> 
> Hello,
> 
> I am having problems accessing a database through ODBC.  I first
> sent an
> email describing my problems accessing an MS Access database
> through PHP.
> Today I installed MySQL.  I have no problems accessing my test
> database with
> the mysql commands.  I downloaded MySQL's ODBC driver.  I get the
> same error
> message trying to access this database w/ODBC as I did with the MS
> Access
> database.
> 
> I am running Windows XP Professional, PHP 4.3.1, and Apache 1.3.27.
> 
> Here's my PHP code:
> 
> $connection = odbc_connect("testmysql", "", "")  or die ("Couldn't
> connect
> to the server.");
> 
> $sql = "SELECT * FROM member";
> 
> $result = odbc_exec($sql,$connection) or die ("Couldn't execute
> query");
> 
> I get the following error message in my browser:
> 
> Warning: odbc_exec(): supplied argument is not a valid ODBC-Link
> resource in
> c:\program files\apache group\apache\htdocs\test4.php on line 17
> Couldn't execute query
> 
> Anyone have any ideas of what I should do so I can access a
> database through
> ODBC?
> 
> ----------------------
> Beverly Steiner
> steiner277@charter.net
> 
> 
> 
> --
> 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
> 


=====
Mark Weinstock
mark_weinstock@yahoo.com
***************************************
You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing.
***************************************

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

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