07-23-2009 10:44 AM
I was told (and have seen for myself) that there is a bug with the OLEDB provider when using Raw SQL statements to do updates.
I was told to use the "Dataset" method. So I came up with the following code to test..
It does update the main database, but the Tiff files are still not being created.
Dim conString As String = "Provider=SLXOLEDB.1;Password=mypass;Persist Security Info=False;User ID=myuser;Initial Catalog=SalesLogix;Data Source=MYserver;Extended Properties=PORT=1706;LOG=ON"
Dim cn As New OleDbConnection(conString)
Dim strSQL As String = "Select * from c_Account_ext where accountid = 'A6UJ9A002FDT'"
Dim da As New OleDbDataAdapter(strSQL, cn)
Dim ds As New DataSet()
da.FillSchema(ds, SchemaType.Source, "c_Account_ext")
Dim cmdBuilder As New OleDbCommandBuilder(da)
da.UpdateCommand = cmdBuilder.GetUpdateCommand
.Rows(0)("Adj_Schedule") = "test2"
07-23-2009 12:08 PM
We saw this problem using "raw SQL" in a .NET app when doing data imports at one of our client sites a couple of years ago. AT first we thought it was a Framework 1.1 issue. However, even upgrading to 2.0 (vs2005) did not make any difference
Specifically, an (console) application that connects to the provider and looping thru an import source creating Account(s), contact(s) and Opportunities. If I remember correctly, the loop would get to a certain number of records and then have "silent failures"...
We actually added an intentional delay into the code (loop) so that we did not "overrun" the provider. Eventually the client paid us to rework the code and we converted over to using "datasets". After that.. zero problems running at full speed.