I have an error in my VB.NET program. I have tried various casts, etc., but it just will not resolve the issue - so reluctantly I post it here to see if anyone else has a similar problem.
Error message
Error 1 Option Strict On disallows implicit conversions from 'Object' to 'String'.
Code
Private DS As New DataSet ' Languages
Function TransTxt(ByVal Frm As String, ByVal Item As String) As String
Dim language As String
Select Case My.Settings.Language
Case 0 : language = "en" ' English
Case 1 : language = "fr" ' French
Case 2 : language = "it" ' Italian
Case 3 : language = "sp" ' spanish
Case 4 : language = "pt" ' portuguese
Case 5 : language = "de" ' german
Case 6 : language = "du" ' dutch
Case Else : language = "en" ' English
End Select
Try 'ONE of these rows is the error
Dim DR() As DataRow = DS.Tables(Frm).Select("Tag = '" & Item & "'")
Return DR(0).Item(language)
Catch ex As Exception
Return "- error -" & Item
End Try
End Sub
ONE of these rows is the error" at the beginning of the try block and the fact that the OP didn't say in which line the error occurred made me read the question sloppily. - Heinzi