|
-
Aug 9th, 2003, 06:19 AM
#1
Thread Starter
New Member
null values to column in the datagrid
Hello,
I have a problem Here.
I have a button fetch all, when i press the button
i will frame a select statement like
sstr = ""
sstr = sstr + select menu_id,"
sstr = sstr + parent_id,"
sstr = sstr + menutext,"
sstr = sstr + iconfile,"
sstr = sstr + appid,"
sstr = sstr + from menurelations"
orada = new oracleclient.oracleadapter
orda.fill(ds,"menurelations")
datagrid_menulist(ds,"menurelations")
the value has been populated in the grid.
Here i will have the problem.
If there is a null value in the say in iconfile or
some of the fields.How to pass empty values
to the grid.when i say nvl(iconfile,' ') iconfile this
will solve my problem.But if i have more than 20
or 30 fields in the table will have null values suppose.
Generally how do i handle this.
hope the question is clear.
Thanks and regards
shawlin
-
Aug 9th, 2003, 06:38 AM
#2
Frenzied Member
You may pass DBNull.Value instead of any null value to the database. In case of strings "" will pass a string that is empty, still its not a null value that means nothing at all.
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|