All Forums Connectivity
marcmc 112 posts Joined 12/05
18 Jan 2007
Please Help

Please help!Visual Studio VB.NET 2005 - DB: Teradata - .NET Data Provider for Teradata. (teradat.client.profile.dll)I have given my dataAdapter this Select command.SELECT * FROM DEV_DATA_T.MISRE_Threshold ORDER BY ID1It has returned this for my Update Statement.UPDATE "DEV_DATA_T"."MISRE_Threshold" SET "ThresholdType" = ?, "ThresholdValue" = ?, "Threshold_Flag" = ?, "Actual" = ?, "Fail" = ?, "Category" = ?, "ID1" = ? WHERE (("ThresholdType" = ?) AND ("ThresholdValue" = ?) AND ((? = 1 AND "Threshold_Flag" IS NULL) OR ("Threshold_Flag" = ?)) AND ("Actual" = ?) AND ("Fail" = ?)AND ((? = 1 AND "Category" IS NULL) OR ("Category" = ?)) AND ((? = 1 AND "ID1" IS NULL) OR ("ID1" = ?))) -- 17 placeholder params.I get Error 3939: There is a mismatch between the number of parameters specified and the number of parameters required.The update, insert, delete, select & table mappings were created. My table has a primary key. The update statement has 17 parameters & the parameters collection for the update command has 17 parameters too. One for each placeholder above and 3 extra for lines 5,7 & 8 where placeholders are used as the columnName = 1...How can this be happening? It's almost as if the dataset software ignores the fact that the placeholders should be substituted for values as it gets the same error that you would get if you simply copied the update into queryman!

marcmc 112 posts Joined 12/05
18 Jan 2007

It seems this is a bug in the Teradata Driver.Has anyone had experience with this?

marcmc 112 posts Joined 12/05
25 Jan 2007

This has been logged with Teradata.Global Support Centre have identified it as a true bug and are dealing with it, no pressure guys, we only go live in 2 weeks.

marcmc 112 posts Joined 12/05
22 Feb 2007

Workaround as follows: Private Sub btnUpdateDataSet2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdateDataSet2.Click If DataSet11.HasChanges Then CursorOn() Try TdCommandBuilder = New Teradata.Client.Provider.TdCommandBuilder(TdDataAdapter1) TdDataAdapter1.Update(DataSet11.MISRE_Threshold) Catch ex As Exception MessageBox.Show(ex.ToString) MessageBox.Show("Update failed. Possible cause:Constraints.") End Try CursorOff() sbThresholds.Text = "Threshold data updated." Else MessageBox.Show("No changes were made to the Dataset.") End If End Sub

markm 2 posts Joined 03/07
18 Mar 2007

I'm having this same problem. Any responses from support w/regards to fix?

marcmc 112 posts Joined 12/05
29 Mar 2007

no but the workaround for the update is fine, td will apparently be packaging the fix with the next release. If you are inserting or deleting then the workaround needs quite a bit of modification.

You must sign in to leave a comment.