Hi Wael
You can get information needed by using
table schema with the FillSchema method of the DataAdapter
Dim da As SqlClient.SqlDataAdapter
Dim ds As New DataSet
Dim con As SqlClient.SqlConnection
Try
Dim con As New SqlClient.SqlConnection("Your connection ")
Dim da As New SqlClient.SqlDataAdapter(TableName , con)
da.FillSchema(ds, SchemaType.Source, "Schema")
' Field Length = ds.Tables("schema").Columns(FieldName).MaxLength
Catch ex As System.Exception
MsgBox(ex.Message)
End Try
Best regards
Sameh Refaat
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!