Skip to Content.
Sympa Menu

freetds - RE: "INSERT INTO" won't work but no error message is se nt back.

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Thompson, Bill D (London)" <ThompBil AT exchange.uk.ml.com>
  • To: "'TDS Development Group'" <freetds AT franklin.oit.unc.edu>
  • Subject: RE: "INSERT INTO" won't work but no error message is se nt back.
  • Date: Fri, 6 Sep 2002 14:11:17 +0100


Hi Thomas,

Welcome to FreeTDS!
This is an interesting one, although not I suspect a FreeTDS issue.
I say this because :

1) you are undoubtedly connecting OK ( you can do a select...)
2) you can see the commands getting to the server (using ethereal)
3) you know that FreeTDS will report back a server side error ( you've tried
that and it works )
4) there's nothing different ( in FreeTDS terms ) between issuing a select
statement and an insert statement. Both are just text commands which go down
the line to the server.

So. That leaves us with a problem. I can think of two reasons why you might
not subsequently see the inserted data

1) prior to issuing the insert , you issued a "begin tran(saction)"
statement, and you haven't subsequently committed that transaction with a
"commit tran(saction)". In these circumstances SQL Server will roll back
your insert.

2) When you go and verify the data ( using something like query analyzer I
presume ) , you are connecting to a different database, or your select
statement is not retrieving the row for some other reason ( for example, a
subtle difference between the data you think you inserted and the data you
actually inserted)

I'll try and think of any other reasons that may cause this, but nothing
else obvious springs to mind.

Hope this helps,

Bill


> -----Original Message-----
> From: Thomas Noetges [SMTP:thomas.noetges AT web.de]
> Sent: Friday, September 06, 2002 1:34 PM
> To: TDS Development Group
> Subject: [freetds] "INSERT INTO" won't work but no error message is
> sent back.
>
> Hi out there,
>
> using FreeTDS with DBI, DBD and all this (Perl), I try (and in some cases
> succeeded) to connenct to a MS SQL-Server (2000). "SELECT * FROM ..."
> works fine.
>
> When I try to insert something in an existing table "INSERT INTO
> tblSomeTable (fldID, fld01, ...) VALUE (1, 'Test', ...)" everything's
> fine, too. At first sight... When I look at the table, NOTHING was
> inserted also I did no get any error-message. When corrupting the "INSERT
> INTO ..." command (e.g. "INSRT NTO ...") an error occurs!
>
> Can anyone enlighten me, what might be wrong. Perhaps somethings with
> User-Right or something like that? But why does MS SQL-Server not send an
> error?
>
> I user Etherreal ("Port-Sniffer") to look what reaches the MS SQL-Server.
> An "INSERT INTO ..." is received (I also knew before because of the
> corrupting-thing, described above).
>
> For all tips much thanx in advance.
>
> Kind regards
>
> Thomas Nötges
>
> ---
> You are currently subscribed to freetds as: [thompbil AT exchange.uk.ml.com]
> To unsubscribe, forward this message to
> $subst('Email.Unsub')




  • RE: "INSERT INTO" won't work but no error message is se nt back., Thompson, Bill D (London), 09/06/2002

Archive powered by MHonArc 2.6.24.

Top of Page