i am runnig this code inside a reader loop:
While reader.read
For x = 0 To reader.FieldCount - 1
MsgBox(reader.GetValue(x))
Dim find_text As String = "<<" & reader.GetName(x) & ">>"
Dim replacet_text As String = reader.GetString(x)
oDoc.Content.Find.Execute(FindText:=find_text, ReplaceWith:=replacet_text, Replace:=word.WdReplace.wdReplaceAll)
Next
End While
so its showing every column as my SQL query says SELECT * from table1
but the issue is, depending on the type of column in the database its showing errors like cannot be converted to type 'String'.
how can i do ALL columns no matter what type? i just want to read all into a string