Skip to Content.
Sympa Menu

freetds - Re: MSSQL - first insert succeeds, second one fails .

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Wasson, Tim" <WassonT AT kochind.com>
  • To: "'TDS Development Group'" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: MSSQL - first insert succeeds, second one fails .
  • Date: Mon, 9 Oct 2000 09:52:50 -0500


Forgot to mention - I'm running version .50 with a small patch for proper
date returns on SQL 7.0.


> -----Original Message-----
> From: Wasson, Tim [SMTP:WassonT AT kochind.com]
> Sent: Monday,October 09,2000 9:05 AM
> To: TDS Development Group
> Subject: [freetds] Re: MSSQL - first insert succeeds, second one
> fails .
>
> The symptoms are: The select will work fine. The insert will actually
> put
> data into the table, which I have verified with a query on the db on the
> Winbox. However, the page generates the "Document contained no data"
> error
> in Netscape.
>
> The topofpage.php3 is used to provide the StartPage and endpage functions
> and is used in many other places with no problems. It's not a permissions
> problem since the insert actually succeeds. In my previous post I thought
> it was hanging on the second insert try, but it's actually hanging on the
> first attempt, as I discovered in preparing this short test script.
>
> If I comment out the $otherjunk=mssql_query($query); line, the script runs
> fine. Add the line back in and it hangs.
>
>
>
> <?
> // this script is running on a Slackware 7.0 box
> require("/usr/analysis/website/topofpage.php3");
> StartPage("Testing a problem");
>
> // DJANGO is a MSSQL 6.5 db on an NT4 box.
> // tblCargo contains only one field named Type and it's a varchar 255
> $servername="DJANGO";
> $user="wassont";
> $password="fuzzy";
>
> $database="datedbrent";
>
>
> $sqlcon = mssql_connect($servername, $user, $password);
> mssql_select_db($database, $sqlcon);
>
> print("Try the select");
> $query="SELECT * FROM tblCargo";
> $junk=mssql_query($query);
>
> print("Try the insert");
> $query="INSERT INTO tblCargo (Type) VALUES('4545')";
>
> // this is the line that causes the problem.
> $otherjunk=mssql_query($query);
>
>
> endpage();
> ?>
>
>





Archive powered by MHonArc 2.6.24.

Top of Page