Borland®
Community
[an error occurred while processing this directive]  ENTERA DEVELOPER SUPPORT

Frequently Asked Questions

NULL characters from data access server

Question:

If my SQL statement returns a string of length NULL it returns
the string "NULL" not the character NULL ('\0' in C or C++).  Is
there a way to change this?

Answer:

With Entera 3.x the default setting is to return a string that 
contains "NULL" for any column that is 0 length.  If you wish to 
change the way an Entera 3.x data access server represents a NULL
string you can set the DAP_NULL_CHAR environment variable.  For
example - if you what the server to return the string 'no_data'
type:
	
	export DAP_NULL_CHAR='no_data'

from bash before you start your server. If you upgrade an Entera 
2.x server to 3.x and plan to use existing Entera 2.x clients you
will probably want to type:
	
	export DAP_NULL_CHAR=''

because Entera 2.x servers return '\0' and 3.x return "NULL" for
empty columns.  By doing this you ensure that the 2.x clients
recieve valid NULL columns.