Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199901

[PHP3] IIS4 ODBC update - ASP works but PHP doesn't From: Alexander Wenzl (awenzl <email protected>)
Date: 01/28/99

Platform: NT
Server: IIS4

I have a very tough problem. I wrote PHP scripts which have to run on
IIS4. They work fine but I have one problem:
When I try to write to an ODBC-Database via PHP3 I get the following
error message:

Warning: SQL error: [Microsoft][ODBC Microsoft Access
                        97 Driver] Operation must use an updatable
                        query., SQL state S1000 in SQLExecDirect in
                        ../../6ssi/splib.inc on line 60

This error usually occurs when a database is write-protected but in
this case it is not.

I wrote an ASP-script which has the same task. And it works!
Same DSN, same query. Both Scripts (PHP3, ASP) in the same directory.

What may be the reason?

---------------------------------------
ASP-File

<%
Set ObjDB = Server.CreateObject ("ADODB.Connection")
objDB.Open "presse"
Update = "UPDATE meldungen SET quelle = 'Herminator gewinnt' WHERE id= 1"
Set objRS = ObjDB.Execute(Update)
%>
----------------------------------------
PHP3-File

<?
$conn = odbc_connect("presse", "", "");
$query="UPDATE meldungen SET quelle = 'Herminator gewinnt' WHERE id=1";
odbc_exec($conn, $query);
odbc_close($conn);
?>
----------------------------------------

Alexander Wenzl - Programmierer
____________________________________________
inTouch multimedia
Mobil: 0676/417 30 55 - http://www.intouch.at
Zentrale: 03112/74 44 - Fax: 03112/74 45
A-8200 Gleisdorf - Am Hofacker 8

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev-list-admin <email protected>