Convert is not a member of String

  • Thread starter Thread starter No_So_Clever
  • Start date Start date
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
 
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
 
Back
Top