..NET 1.1 --> DataAdapter with the relevant commands specified.
..NET 2.0 --> SqlBulkCopy -> DataTableReader or simply a DataAdapter (the
..NET 1.1) way. You can also specify BatchSize in .NET 2.0 for better
performance.
Alternatively, write it out as CSV and import using DTS/SSIS
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
----------------------------------------------------------------------------
"Bruno Alexandre" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi guys,
>
> I have a dataTable with 2 columns and several rows...
>
> How can I pass this into the Database?
> How can I read row by row so I can insert it in Database, somthing like
>
> for each dataTable.row
>
> col1 = .column("date").toString
> col2 = .column("desc").toString
>
> sSQL = "INSERT INTO tblTable (t1, t2) VALUES ('" & col1 & "', '" & col2
> & "')"
>
> next
>
>
> --
>
>
>
> Bruno Alexandre
> (Sintra, PORTUGAL)
>
>
>
>