Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: NOT NULL attribute in schema files  (Read 14365 times)
Tim B.
Posts: 67


« on: December 04, 2008, 04:18:56 pm »

I don't think the schema generator (for SQL Server 2000) is picking up the NOT NULL column attribute correctly.  I've been having problems with fields not displaying the "This field requires an entered value" message when the field is linked to a NOT NULL column.

I checked the schema file and compared it to one from BDS and they are different:-

BDS
sysparam^param_code^256^10^4^    (256 means NOT NULL I believe)

Genero
sysparam^param_code^0^10^4^

This seems to apply for all columns within the schema. The schema was generated with Studio, if that makes any difference.
Sebastien F.
Four Js
Posts: 545


« Reply #1 on: December 04, 2008, 04:31:16 pm »

What FGL version are you using? and what Studio version are your using?

In our current FGL 2.11 release, I found the following in FGLDIR/release/changes.txt:

====================================================================
build 966.26
bug 8452: fgldbsch does not extract text/image data type from SQL Server.

bug 8453: fgldbsch ignores NOT NULL columns when extracting from SQL Server.
====================================================================

So this was fixed in fgldbsch in FGL version 2.02.05 ...

Seb
Tim B.
Posts: 67


« Reply #2 on: December 04, 2008, 04:36:28 pm »

FGL is 2.11.03 and Studio is 2.10.02.  Looks the fix didn't fix it.
Sebastien F.
Four Js
Posts: 545


« Reply #3 on: December 04, 2008, 04:44:20 pm »

Could you please check with fgldbsch in the FGL 2.11 environment instead of generating the schema from Studio?
Seb
Tim B.
Posts: 67


« Reply #4 on: December 04, 2008, 04:49:26 pm »

Same result:-

sysparam^param_code^0^10^4^

C:\Program Files\FourJs\fgl_2_11_03\bin>fgldbsch -V
fgldbsch 2.11.03 build-1169.8
(c) 1989-2008 Four J's Development Tools
Tim B.
Posts: 67


« Reply #5 on: December 05, 2008, 01:51:35 pm »

The offending code is in fgldbslib.4gl:-

Code
  1. # IF ifxtype>-1 AND msvnull=="NO" THEN
  2.  IF ifxtype>-1 AND msvnull=="No" THEN

I have fixed in our FGL and Studio installations and it seems to be working now, except that in the database schema browser in Studio it is still states "NOT NULL: No" for NOT NULL columns.  The .sch file looks OK though.
Sebastien F.
Four Js
Posts: 545


« Reply #6 on: December 05, 2008, 03:02:50 pm »

Tim,

So for you, msvnull=="NO" does not work, it must be "No" ???
What version of SQL Server do you have?
I have SQL Server 2005 and "NO" works fine for me...!!!

In SQL Query, what shows the IS_NULLABLE column of a

  SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'yourtable'

?

Seb
Tim B.
Posts: 67


« Reply #7 on: December 05, 2008, 04:24:11 pm »

It is SQL 2000 and it returns either "No" or "YES".  Good old MS keeping things nice and consistent.  I guess you'll have to change it to check No and NO, or UPSHIFT them first.
Sebastien F.
Four Js
Posts: 545


« Reply #8 on: December 05, 2008, 04:40:53 pm »

Thank you Tim for pointing us on this difference.
Probably a bug fix in SQL Server 2005 (why "No" in lower case and "YES" in uppercase?)
I will adapt fgldbsch immediately (2.11.08).
Thanks again.
Seb
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines