note 5531 deleted from odbc_connect by ronabop

From: Date: Fri, 11 Aug 2000 09:40:07 +0000
Subject: note 5531 deleted from odbc_connect by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-1121@lists.php.net to get a copy of this message
I made a text file in WinNT as a TEXT System DSN and I'm simply trying to (i) connect to and (ii) query it. But I keep getting: Warning: SQL error: [Microsoft][ODBC Text Driver] The Microsoft Jet database engine cannot open the file 'test.txt'. It is already opened exclusively by another user, or you need permission to view its data., SQL state S1000 in SQLExecDirect in webpages/test.php on line 79 Question 1: Why can't I open the ODBC connection? Here's my source: $res5 = odbc_connect("test","",""); if ($res5 == 0) { echo "no odbc connect"; } else { echo "ok odbc connect"; } echo '<BR>'; $res6 = 0; $res6 = odbc_exec($res5, "select * from test"); if ($res6 == 0) { echo "faile odbc query"; } else { echo "ok odbc query"; }

« previous php.notes (#1121) next »