NULL with OLEDB

General discussion forum about all databases other than SqlBase.
FRBhote
India
Posts: 2201
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

NULL with OLEDB

Post by FRBhote » 26 Aug 2016, 14:28

When I insert a variable with null into SqlServer with OLEDB it inserts '', whereas with ODBC it inserts a NULL.

The fist row is ODBC and the second is OLEDB.

!!CB!! 174
Set sNull = STRING_Null
Call SqlPrepareAndExecute( hSql, 'INSERT INTO ACCOUNTS ( AC_CO, AC_NO, CONTROL ) VALUES ( 2, 1, :sNull )' )

Code: Select all

2   1   NULL   NULL   0.000
2   2   TT      0.000
Is there a way to make it insert a NULL instead of ''.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 0 guests