Skip to Content.
Sympa Menu

freetds - RE: problem inserting nulls in a temporary table in a s tored procedure

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Isaac Grant" <isaac AT silverorange.com>
  • To: "'TDS Development Group'" <freetds AT franklin.oit.unc.edu>
  • Subject: RE: problem inserting nulls in a temporary table in a s tored procedure
  • Date: Fri, 8 Nov 2002 16:34:34 -0400


Hey James,

Thanks for the response. I had actually meant to include this info, and
just forgot to.

We had both version 0.51 and 0.60 configured with --with-tdsver=7.0 -
nothing else changed with the configuration of our server except for the
version of tds.

Isaac

-----Original Message-----
From: bounce-freetds-150436 AT franklin.oit.unc.edu
[mailto:bounce-freetds-150436 AT franklin.oit.unc.edu] On Behalf Of Lowden,
James K
Sent: Friday, November 08, 2002 2:52 PM
To: TDS Development Group
Subject: [freetds] RE: problem inserting nulls in a temporary table in a
s tored procedure

> From: Isaac Grant [mailto:isaac AT silverorange.com]
> Sent: November 8, 2002 1:26 PM
>
> Running the following stored procedure returns an error:
>
> CREATE PROCEDURE sp_testing as
> SET NOCOUNT ON
> CREATE TABLE #test (testcol1 int,testcol2 int)
> INSERT INTO #test VALUES (1,NULL)
>
> SELECT * FROM #test
>
> Ther error returned is:
>
> Nov 8 14:17:52 zest httpd: PHP Warning: Sybase error:
> Cannot insert the
> value NULL into column 'testcol2', table
> 'tempdb.dbo.#test_____________________________________________
__________________________________________________________________000100
0149
89';column
> does not allow nulls. INSERT fails. (severity 16)


That's completely normal.

There's a database option that determines the default nullness of
columns.
It can also be affected by connection settings. Cf. SET
ANSI_NULL_DFLT_ON.


Which API and TDS version are you using? It might be that the
connection
setting changed between versions.

--jkl




The information contained in this transmission may contain privileged
and
confidential information and is intended only for the use of the
person(s)
named above. If you are not the intended recipient, or an employee or
agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication
is
strictly prohibited. If you are not the intended recipient, please
contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that we do not accept account orders
and/or
instructions by e-mail, and therefore will not be responsible for
carrying
out such orders and/or instructions.



---
You are currently subscribed to freetds as: [isaac AT silverorange.com]
To unsubscribe, forward this message to
$subst('Email.Unsub')





Archive powered by MHonArc 2.6.24.

Top of Page