Problems with odbc and null fields ODBC Driver version 2.0.3.154

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with odbc and null fields ODBC Driver version 2.0.3.154

Lawrence Bridger

Hello

 

I have a conundrum which I cannot solve and for which I cannot find a solution in the archives.

 

I have a table with a primary key and one other integer field named, say, ABC.  This field is defined as not null but has a default source value of, say, 0.

 

I am using an application which uses the ODBC driver above.  I have the option to set this field, within the application, to be a null field.  If I do so and try and insert a record I get an error message -625 Validation error for column ABC, value "***null***" .  I think that the ODBC driver is looking at the DB table, determining that the field is defined as not null, and therefore produces this error message.

 

If I set the option to not being a null field, the message I get is -303 Dynamic SQL Error  SQL error code = -303  conversion error from string "".  Again I believe that the DB is receiving a message to insert the record but has determined that the value is blank rather than NULL.  In this particular instance I would like the record to be inserted using the default source value, but the error message prevents the update.

 

I have found a work around in that if I was to purchase Easysoft's ODBC driver for Firebird the problem simply disappears, but I do believe that the official Firebird ODBC driver should cope with this scenario.

 

Please can anybody suggest a solution or advise me what I might be doing incorrectly to solve this?

 

Many thanks in advance

 

Lawrence Bridger

 

 

L D Bridger ACA

Managing Director

 

 

L D Bridger ACA

Managing Director



bridger

Folding Carton Manufacturers

Avenue One
Letchworth
Hertfordshire
SG6 2WP

Telephone 01462 636465
Web www.bridger.co.uk

This e-mail, and any attachment(s), is intended solely for the use of the individual(s) to whom it is addressed. It may contain confidential, proprietary or legally privileged information, none of which is waived or lost by mis-transmission. If you receive this message in error, please delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. Action taken, or not taken, in reliance of it, is prohibited and may be unlawful.
Any views or opinions presented are solely those of the author and do not represent the views of Bridger Packaging. Any e-mail sent to this sender's address might be monitored and/or read by any other employee of Bridger Packaging.

Bridger Packaging is a division of T D Bridger Limited
Registered in England No. 366193
Registered office as above
VAT Registration No. GB 196 2240 57

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
Firebird-odbc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems with odbc and null fields ODBC Driver version 2.0.3.154

Dimitry Sibiryakov-3
09.03.2016 13:40, Lawrence Bridger wrote:
> Please can anybody suggest a solution or advise me what I might be doing incorrectly to
> solve this?

   If you want a field to get default value, you must not mention the field in INSERT query.

--
   WBR, SD.

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
Firebird-odbc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel