Convert is not a member of String

N

No_So_Clever

Hi All,

I have the following Code:

Public Sub SetAccessLevelNull()
Me(Me.tableGeneralPasswords.AccessLevelColumn) = System.Convert.DBNull
End Sub

Im getting a ErroR on this Saying "Convert is Not a Member of String"
Could somebody kindly point me in the right direct?

Many Thanks
NSC
 
B

Bart Mermuys

Hi,

No_So_Clever said:
Hi All,

I have the following Code:

Public Sub SetAccessLevelNull()
Me(Me.tableGeneralPasswords.AccessLevelColumn) = System.Convert.DBNull
End Sub

Looks like wizard generated code for a Typed DataRow, where
SetAccessLevelNull is the right way to set the field to null.

Do you by any chance have a DataColumn name "System" ? If you do then
"System" is a property on the typed DataRow that returns a string. So
rename your "System" column or use "DBNull.Value" instead of
"System.Convert.DBNull".


HTH,
Greetings
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top