Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataAdapter.Fill vs DataAdapter.FillSchema and new row
Message
 
To
22/11/2002 14:07:43
Rex Mahel
Realm Software, Llc
Ohio, United States
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00725935
Message ID:
00725946
Views:
7
Rex:

Hope this code that cathy send to me work for you or give you some ideas how to work with your problem.

Dim dr As DataRow
Dim fi As FileInfo
Dim dir As New DirectoryInfo("C:\")
Dim dt As New DataTable()

dt.Columns.Add("FileName", GetType(System.String))
dt.Columns.Add("Size", GetType(System.Int32))

For Each fi In dir.GetFiles()
dr = dt.NewRow()
dr(0) = fi.Name
dr(1) = fi.Length
dt.Rows.Add(dr)
Next

I change that a littler because i that time i did not know the value for each individual column so i place a Space(1) value in the column that giveme the null error. BTW the error was by definition in the sql server that did not accept null values.
Gregorio J. Placeres
IT Analyst
Uniform Accounting Network
Auditor of State of Ohio
88 East Broad Street
P.O. Box 1140
Columbus, Ohio 43216-1140

Tel. 614-728-4694

Gregorio_J@MSN.COM

http://www.gjpproductions.com
Previous
Reply
Map
View

Click here to load this message in the networking platform