Updating Data in a SQL-Database with DotNet DataAdapter and Data Rows

FragenFragerFragenFrager Member Posts: 25
edited 2019-09-13 in SQL Tips & Tricks
Hello,
I'm provided with the task to update a programm that transfers data to a SQL-Database. It is from an older version and uses ADO recordsets, which simply does not work with NAV Business Central any more.
So, I wanted to use System.Data.SqlClient.SqlDataAdapter, System.Data.DataTable, System.Data.DataRow and so on.
Reading data into DataAdapter works fine, but I simply do not get how to transfer data into SQL Database with it.
I tried to put Data into a DataRow ( System.Data.DataRow), but it is not even possible to identify the column with its name (e.g. DotNetSQLDataRow.Item('Name') ). Identifying it with the integer-value of the column works, okay, but then I simply cannot put a value into it. A simple DotNetSQLDataRow.Item(0) := NewValue is allready denied by the compiler.
The examples dealing with this only refer to C# or VB.net. I simply could not find any examples using C\SIDE-Code.
I would be very, very glad If anyone can help me.

With kind regards
FF
Sign In or Register to comment.