If you're asking about the length of a VarChar, it can be retrieved from the
Columns collection assuming you ask for it nicely. Make sure to include
MissingSchemaAction.AddWithKey to fill this in.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
cn = New SqlConnection("Data Source=demoserver;integrated
security=sspi;initial catalog=biblio")
da = New SqlDataAdapter("select au_id,author from authors", cn)
da.MissingSchemaAction = MissingSchemaAction.AddWithKey
da.Fill(ds)
Debug.WriteLine(ds.Tables(0).Columns(1).MaxLength())
End Sub
hth
--
____________________________________
Bill Vaughn
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
can