Apparently this isn't how you do it
so how do you stick a null value in there?VB Code:
NewRow = TheTable.addrow NewRow.Item(2) = DBNull 'this doesn't work 'and this parser shouldn't have used lastindexof apostrophe :P
Printable View
Apparently this isn't how you do it
so how do you stick a null value in there?VB Code:
NewRow = TheTable.addrow NewRow.Item(2) = DBNull 'this doesn't work 'and this parser shouldn't have used lastindexof apostrophe :P
did u try just null?
Umm, Shouldn't it be Nothing??
potatoe patata. point is.. try different stuff
the thing is, dbnull should have worked. I think if I assign it to nothing it will try to destroy that datarow.item object :( and I would try different things except I can't test this at all for reasons I won't get into cuz it's a loooong story so i need to make sure it's correct ahead of time
well that sucks.. u can't like.. copy the file and use that one as a test file?
does this look right?
cuz it's giving me the "that's a little iffy" squigglies :PVB Code:
Dim TheNull As DBNull For x As Integer = 0 To tblQues.Rows.Count - 1 tblQues.Rows(x).Item(1) = TheNull Next
and I can't test it cuz I can't import a test from csv file into this database because I used my export test to make it and I don't want to double up tests cuz my management studio is broken (or more likely my mdf file) so I can't easily delete a whole new test cuz it spans 4 tables so I need to alter the csv file myself and import it into another copy of this database then toss that one if it works and make another copy of the original so my instructor can test the import without actually adding it to the original database. See told you it was complicated.
DBNull is a class, so you can't just assign DBNull to a field. DBNull is the type of the object stored in a null field, not the value of the object.VB Code:
tblQues.Rows(x).Item(1) = DBNull.Value
w00t! you're a genius :D Here I got you one of those new vehicles that runs on corn. It's a slightly older model though...
http://img.photobucket.com/albums/v3...144/lowbow.jpg