All Forums Connectivity
marcmc 112 posts Joined 12/05
17 Jan 2007
update error Error 3939

Teradata.Client.Provider.tdException: [Teradata Database] [3939] There is a mismatch between the number of parameters specified and the number of parameters required.My update is generated through the .net 2005 dataAdapter config wizard based upon a select stmt i give to it. The select statement is:SELECT ThresholdType, ThresholdValue, Threshold_Flag, Actual, Fail, Category FROM DEV_DATA_T.MISRE_Threshold ORDER BY ID1The wizard generates the update as follows:UPDATE "DEV_DATA_T"."MISRE_Threshold" SET "ThresholdType" = ?, "ThresholdValue" = ?, "Threshold_Flag" = ?, "Actual" = ?, "Fail" = ?, "Category" = ? 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" = ?)))Any ideas what I or indeed the config wizard am doing wrong?Is it just me or does the .NET Provider for TeraData not do what it claims it can do!?!

marcmc 112 posts Joined 12/05
17 Jan 2007

Could the problem be that the data Adapter did not create any parameters collection for the Update command!!!!How do i go about fixing that?note: I am migrating this application from VS2003 to VS2005 and from SQLServer to Teradata.This worked in the SQLServer architecture and has a parameters collection for the update.Could I copy these?Any recommendations(within reason!) are acceptable at the moment.marc

marcmc 112 posts Joined 12/05
17 Jan 2007

I have now added the parameters as per the columns of the table used in the select. There is no way to quantify what '?' is in the update command so I can only include these.Also, I have just noticed the insert command was not generated.Would this cause an issue?note: I know that SQLserver does a delete and insert for an update but teradata architecture just does a straight update.

You must sign in to leave a comment.