i need to check that the column exist in the table if yes the update/insert value in the column else i need to add the new column like new browser name in the table.
after the search i found some thing like and make the procedure like
Dim daAs SqlDataAdapter, dsAs DataSet, dcAs DataColumn, foundsAsBoolean
Try
Conn.Open()
cmd =New SqlCommand(str, Conn)da =New SqlDataAdapter(cmd)
ds =New DataSetda.Fill(ds,"tbls")
ForEach dcIn ds.Tables(0).ColumnsIf UCase(colnames) = UCase(dc.ColumnName)Then
founds =True
ExitFor
Else
founds =False
EndIf
Next
Catch exAs ExceptionFinally
Conn.Close()
EndTry
Return founds
sugesstions on this is required.................
No comments:
Post a Comment