2 messages in com.mysql.lists.javaRe: SQLWarning problem
FromSent OnAttachments
Thomas Olsson20 May 1999 00:27 
Christian Mack20 May 1999 04:50 
Subject:Re: SQLWarning problem
From:Christian Mack (Ma@compal.de)
Date:05/20/1999 04:50:27 AM
List:com.mysql.lists.java

Thomas Olsson wrote:

Hello,

I cannot get the mm mysql driver (or perhaps mysql) to report ANY SQLWarnings. I've tried really provoking mysql.

Okej, here's what I'm interesed in. I insert without checking types into a mysql database from my servlet using mm mysql JDBC driver. Since I do not type check I want mysql and mm mysql to warn me when wrong type is inserted.

To get the warnings I've tried using getWarnings() on both Statement and Connection. But every time I no warnings at all! I know there has been warnings from mysql. I have indeed inserted an erroneous type.

I'm using mm mysql 1.0, mysql 3.22.16a on a Solaris machine.

By the way, is there any specific changes that has to be done to use mm mysql 1.1x? Tried to exchange the jar to mm mysql 1.1i, but then the program did not work. (Have not looked closer at why.)

All help appreciated.

Hi Thomas

Mysql doesn't provide warning messages. It only delivers a warning count. Because of this you can't get them via JDBC.

Sorry don't use mm 1.1i at the moment. 1.1g works without problems for me.

Tschau Christian