Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Why don't I get a SQLException ?

4 posts in JDBC Connect (product renamed to JConnect) Last posting was on 1997-05-20 20:29:05.0Z
Michiel Veen Posted on 1997-05-01 07:32:44.0Z
Message-ID: <3368471C.1035@tcf.nl>
Date: Thu, 01 May 1997 09:32:44 +0200
From: Michiel Veen <michiel@tcf.nl>
Reply-To: michiel@tcf.nl
Organization: The Connection Factory
X-Mailer: Mozilla 3.01 (WinNT; I)
MIME-Version: 1.0
Subject: Why don't I get a SQLException ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 22
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:888
Article PK: 252640

Hi,

We have defined a table in Sybase with the following query

CREATE TABLE t2 (mykey char(5),
v1 char(5) NOT NULL,
v2 char(5) ,
PRIMARY KEY (mykey))

When I execute the following query via Jconnect it doesn't give a
SQLException:

INSERT INTO t2 VALUES ('5',NULL,'test')

This is strange because v1 is defined as NOT NULL.

When I execute it via WISQL the same query does give an error:

Server message 233, Severity 16, State 1, Line 1
[Start Extended ERROR]r
database owner table column
-------- ----- ----- ------
shop dbo t2 v1
[End Extended ERROR]r

Is this a bug in Jconnect or am I missing something?

Any insight is welcome.


Kind regards,
Michiel


--

#-- michiel@tcf.nl
#-- The Connection Factory b.v.
#-- http://www.tcf.nl


David Clegg Posted on 1997-05-05 17:33:16.0Z
Message-ID: <336E19DC.23440159@sybase.com>
Date: Mon, 05 May 1997 10:33:16 -0700
From: David Clegg <davec@sybase.com>
X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i586)
MIME-Version: 1.0
To: michiel@tcf.nl
Subject: Re: Why don't I get a SQLException ?
References: <3368471C.1035@tcf.nl>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 36
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:878
Article PK: 252630

I believe that that error-message is being converted to a SQLWarning.
If you call Statement.getSQLWarning() after the executeUpdate you
should be able to see it.
The error is downgraded to a warning based on ANSI-SQL '92 standards.
It seems like an error that deserves to remain an error so you don't
have to add special getSQLWarning calls to detect the problem...
I will be looking into the list of "downgrade to warning" errors
to determine if there is a general fix we can apply.

dave

>
> Hi,
>
> We have defined a table in Sybase with the following query
>
> CREATE TABLE t2 (mykey char(5),
> v1 char(5) NOT NULL,
> v2 char(5) ,
> PRIMARY KEY (mykey))
>
> When I execute the following query via Jconnect it doesn't give a
> SQLException:
>
> INSERT INTO t2 VALUES ('5',NULL,'test')
>
> This is strange because v1 is defined as NOT NULL.
>
> When I execute it via WISQL the same query does give an error:
>
> Server message 233, Severity 16, State 1, Line 1
> [Start Extended ERROR]r
> database owner table column
> -------- ----- ----- ------
> shop dbo t2 v1
> [End Extended ERROR]r
>
> Is this a bug in Jconnect or am I missing something?
>
> Any insight is welcome.
>
> Kind regards,
> Michiel
>
> --
>
> #-- michiel@tcf.nl
> #-- The Connection Factory b.v.
> #-- http://www.tcf.nl


Michiel Veen Posted on 1997-05-07 08:24:52.0Z
Message-ID: <33703C54.32AC@tcf.nl>
Date: Wed, 07 May 1997 10:24:52 +0200
From: Michiel Veen <michiel@tcf.nl>
Reply-To: michiel@tcf.nl
Organization: The Connection Factory
X-Mailer: Mozilla 3.01 (WinNT; I)
MIME-Version: 1.0
Subject: Re: Why don't I get a SQLException ?
References: <3368471C.1035@tcf.nl> <336E19DC.23440159@sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 48
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:868
Article PK: 252619


David Clegg wrote:
>
> I believe that that error-message is being converted to a SQLWarning.
> If you call Statement.getSQLWarning() after the executeUpdate you
> should be able to see it.
> The error is downgraded to a warning based on ANSI-SQL '92 standards.
> It seems like an error that deserves to remain an error so you don't
> have to add special getSQLWarning calls to detect the problem...
> I will be looking into the list of "downgrade to warning" errors
> to determine if there is a general fix we can apply.
>
> dave
>

Hi Dave,

Thanks for de reply, you are right the Statement.getSQLWarning() comes
back with the following message: "The column v1 in table t2 does not
allow null values."

Do you know if there is somewere a document on the Internet about
ANSI-SQL '92 and/or the XOPEN SQL spec., so I don't have to bother you
with this kind of questions anymore :-).

Regards Michiel

> >
> > Hi,
> >
> > We have defined a table in Sybase with the following query
> >
> > CREATE TABLE t2 (mykey char(5),
> > v1 char(5) NOT NULL,
> > v2 char(5) ,
> > PRIMARY KEY (mykey))
> >
> > When I execute the following query via Jconnect it doesn't give a
> > SQLException:
> >
> > INSERT INTO t2 VALUES ('5',NULL,'test')
> >
> > This is strange because v1 is defined as NOT NULL.
> >
> > When I execute it via WISQL the same query does give an error:
> >
> > Server message 233, Severity 16, State 1, Line 1
> > [Start Extended ERROR]r
> > database owner table column
> > -------- ----- ----- ------
> > shop dbo t2 v1
> > [End Extended ERROR]r
> >
> > Is this a bug in Jconnect or am I missing something?
> >
> > Any insight is welcome.
> >
> > Kind regards,
> > Michiel
> >
> > --
> >
> > #-- michiel@tcf.nl
> > #-- The Connection Factory b.v.
> > #-- http://www.tcf.nl


David Clegg Posted on 1997-05-20 20:29:05.0Z
Message-ID: <33820991.665AAD1B@sybase.com>
Date: Tue, 20 May 1997 13:29:05 -0700
From: David Clegg <davec@sybase.com>
X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i586)
MIME-Version: 1.0
To: michiel@tcf.nl
Subject: Re: Why don't I get a SQLException ?
References: <3368471C.1035@tcf.nl> <336E19DC.23440159@sybase.com> <33703C54.32AC@tcf.nl>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 57
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:807
Article PK: 252560

The new version of jConnect (which I've requested be pushed to the
www.sybase.com site later today) fixes this problem where some of
these errors are downgraded to warnings. Download the new version.

>
> David Clegg wrote:
> >
> > I believe that that error-message is being converted to a SQLWarning.
> > If you call Statement.getSQLWarning() after the executeUpdate you
> > should be able to see it.
> > The error is downgraded to a warning based on ANSI-SQL '92 standards.
> > It seems like an error that deserves to remain an error so you don't
> > have to add special getSQLWarning calls to detect the problem...
> > I will be looking into the list of "downgrade to warning" errors
> > to determine if there is a general fix we can apply.
> >
> > dave
> >
>
> Hi Dave,
>
> Thanks for de reply, you are right the Statement.getSQLWarning() comes
> back with the following message: "The column v1 in table t2 does not
> allow null values."
>
> Do you know if there is somewere a document on the Internet about
> ANSI-SQL '92 and/or the XOPEN SQL spec., so I don't have to bother you
> with this kind of questions anymore :-).
>
> Regards Michiel
>
> > >
> > > Hi,
> > >
> > > We have defined a table in Sybase with the following query
> > >
> > > CREATE TABLE t2 (mykey char(5),
> > > v1 char(5) NOT NULL,
> > > v2 char(5) ,
> > > PRIMARY KEY (mykey))
> > >
> > > When I execute the following query via Jconnect it doesn't give a
> > > SQLException:
> > >
> > > INSERT INTO t2 VALUES ('5',NULL,'test')
> > >
> > > This is strange because v1 is defined as NOT NULL.
> > >
> > > When I execute it via WISQL the same query does give an error:
> > >
> > > Server message 233, Severity 16, State 1, Line 1
> > > [Start Extended ERROR]r
> > > database owner table column
> > > -------- ----- ----- ------
> > > shop dbo t2 v1
> > > [End Extended ERROR]r
> > >
> > > Is this a bug in Jconnect or am I missing something?
> > >
> > > Any insight is welcome.
> > >
> > > Kind regards,
> > > Michiel
> > >
> > > --
> > >
> > > #-- michiel@tcf.nl
> > > #-- The Connection Factory b.v.
> > > #-- http://www.tcf.nl