Ecco subito il codice:
---------------------------------------------------------------
Dim ds As New DataSet
Try
dim str As string
str = "selest * from"+ txtTableName.Text.Trim
Dim da As new SqlDataAdapter(str, con)
Dim cb As New SqlCommandBuilder(da)
ds = New DataSet
da.Fill(ds)
Dim dt As DataTable
Dim dc As DataColumn
Dim dr As DataRow
For Each dr In ds.Tables(0).Rows
For Each dc in ds.Tables(0).Columns
if dc.DataType.ToString() = "System.String" then
If IsDBNull(dr(dc.Caption)) then
Else
dr(dc.Caption) = obj.EncriptData(dr(dc.Caption))
End if
End if
Next
da.Update(ds.Tables(0))
MsgBox("OK")
Catch ex As Exception
MsgBox(ex.ToString)
End Try