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.


Recommended Answers

Well, i don't really know what you mean about 'empty'.
Maybe this article can help

Jump to Post

All 4 Replies

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.