Home All Groups Group Topic Archive Search About
Author
29 Mar 2005 8:11 PM
Cezar
Sorry, this can be trivial question, but somehow I cannot find the answer to
it.
When I bind a data grid to a table, then some cells show a text value
"(null)". This is happening for fields that have a database null value.
When I manually read the database I can intercept this and override the
value with a blank string, and this is the behaviour that I really want. How
can I do it when I automatically bind the grid to a source?
Thanks

Author
29 Mar 2005 11:14 PM
Brad Wood
Cezar wrote:
> When I bind a data grid to a table, then some cells show a text value
> "(null)".

What kind of "table" are you binding to?
Author
30 Mar 2005 12:35 AM
Cezar
Regular normal database table in an Access database using a Jet 4 oledb
provider.
The command that is running the query is simply this:
SELECT * FROM MyTable;


Show quote
"Brad Wood" wrote:

> Cezar wrote:
> > When I bind a data grid to a table, then some cells show a text value
> > "(null)".
>
> What kind of "table" are you binding to?
>
Author
30 Mar 2005 8:00 PM
Brad Wood
Cezar wrote:
> Regular normal database table in an Access database using a Jet 4 oledb
> provider.
> The command that is running the query is simply this:
> SELECT * FROM MyTable;

I would suggest creating an Access query with a definition like yay:
SELECT IIf(NullCol Is Null,'', NullCol) AS Whatever, NextCol FROM Table1;

Then change your command object's CommandType property to
StoredProcedure, and set the CommandText to the name you gave to the query.

It is rare that you would really want the entire contents of a table, no?

AddThis Social Bookmark Button