Re: Problems porting from MySQL Server to MSSQL7 Server

From: Date: Fri, 06 Apr 2001 03:00:39 +0000
Subject: Re: Problems porting from MySQL Server to MSSQL7 Server
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-47382@lists.php.net to get a copy of this message
Hello Adrian, There are some concurrency issues with mssql if you are using mssql_pconnect. Try switching to mssql_connect. Also check to see if transactions are enabled in mssql. Your SQL insert syntax looks ok. Regards, John PS: for porting mysql to mssql, have a look at http://php.weblogs.com/adodb for the ADODB database wrapper library. ""Adrian Jurjica"" <adiju@terrasat.ro> wrote in message news:001401c0bd38$51d05580$e4cae7c1@terrasat.ro... Can anyone help me? Today I was informed that the backend for my project will not be MySQL, but MSSQL 7.0. No problems, I said, but after porting database from MySQL to MSSQL I find that the UPDATE statement doesn't work. Strange is that INSERT statement in a php query does not work second time (ie, i made a script for taking records from MySQL and insert in MSSQL; first query work, but second doesn't). Code is here: my_update("update sometable set col1=".$var1." where col2=".$var2); and function: function my_update($query){ global $host,$user,$psw,$name; $conn=mssql_pconnect($host,user,psw) or die("Error: connection failed!"); $rdb=mssql_select_db($name,$conn) or die("Error: DB does not exist"); $rez_q=mssql_query($query,$conn) or die("Error: Invalid SQL"); } The same code and function work fine in MySQL. Why doesn't work in MSSQL Server??? Adrian JURJICA ================================ Tel.: +40-94-128879 E-mail: adiju@terrasat.ro ================================ Nu ocoliti pe Internet: http://oneblackcat.f2s.com http://www.terrasat.ro http://www.transcondor.com http://aimmr.go.ro ================================

« previous php.general (#47382) next »