i was using ms access as my database where my default value for coloum was "" empty string . now i have shifted to sql 2008 where i cannot put empty sting as default value in the same manner as in access i.e "" . here i have to put either '' or " " ie with space within quotes. this value is treated different from "" value. for eg in statement like

if flexgrid.TextMatrix(1, 1)="" then

How can i set empty string in sql so that value is same as access.


6 Years
Discussion Span
Last Post by AndreRet

Your problem lies within your database table in Sql. When the database was created, you have selected that a value MUST be added into the field, hence your error. Edit the specific field in the table to accept null strings.


if i accept null string , i get error in vb '"Invalid use of null"


Did you change the field property in your table to accept a null string? If so, did you specify in your code that the string must NOT be null, hence the error.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.