Skip to Content.
Sympa Menu

freetds - RE: Problem with "insert" ?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frank Bunse <bunse AT comspace.de>
  • To: 'TDS Development Group' <freetds AT franklin.oit.unc.edu>
  • Subject: RE: Problem with "insert" ?
  • Date: Tue, 27 Jul 1999 11:51:14 +0200


Hi Randy,

> The first thing I would do is to look in the current activity
> of the server
> and determine if the query is getting to the database and if its being
> returned. What might be the problem is that the select statements are
> locking the table and the lock hasn't yet been removed when
> you attempt the
> insert and this causes a deadlock situation. MS SQL Server
> 6.5 and 7.0 lock
> the entire table when selecting more than about 75% of the rows.
> You mentions SQL Server 10 - are you using Sybase or MS
> SQL Server
> (whose current version is 7)?

Oh, sorry of course its version 7.0. What happens with the insert-statement
is the following: I send it from the webpage, it connects to SQL-Server, the
Server actually inserts the row and the process goes back to 'Awaiting
command'. So everything would be fine if only the darn php/freeTDS would
generate the page instead of letting Netscape wait forever.

I append the php-code to this mail. FreeTDS V 0.45, PHP3 V 3.0.11, MS-SQL
7.0 running on Linux with Apache 1.3.6.

Any suggestions would be greatly appreciated. Thanks



Frank Bunse


------------------------------------

$id = sybase_connect($server, $user, $pass)
or die ("<H1>Not connectd !</H1>");
mssql_select_db($tablespace);
mssql_query("insert into testtab (string, int) values ('Test', 123)")
or die ("<H1>Error: Not able to insert!</H1>");
$user_nr = mssql_insert_id()
or die ("<H1>Error: Row not created !</h1><br>");
echo $user_nr;
echo 'Row inserted !';
mssql_close($id);

-----------------------------------





Archive powered by MHonArc 2.6.24.

Top of Page