Teradata.Client.Provider.tdException: [Teradata Database] [3939]

Connectivity
Enthusiast

Teradata.Client.Provider.tdException: [Teradata Database] [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 hierarchy_Name from functionalHierarchy where parent_Hierarchy =" + "'" + parent + "'";

The wizard generates the update as follows:

SELECT hierarchy_Name, hierarchy_Desc, parent_Hierarchy, operation_Type, operation_Reason, create_By, last_Updated_By FROM functionalHierarchy WHERE (hierarchy_Name = ?)

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!?!
2 REPLIES
Fan

Re: Teradata.Client.Provider.tdException: [Teradata Database] [3939]

That looks very strange. Is it possible to try a similar operation using the sqlclient ado.net provider to isolate the issue to being either Teradata.NET or VS2005?
Teradata Employee

Re: Teradata.Client.Provider.tdException: [Teradata Database] [3939]

I do not follow your specific case because I do not see how you can pass "parent" variable at design time to the DataAdapter wizard.

"select hierarchy_Name from functionalHierarchy where parent_Hierarchy =" + "'" + parent + "'";

I suggest

"select hierarchy_Name from functionalHierarchy where parent_Hierarchy = ? "

This is a parameterized query. The DataAdapter Wizard will correctly generated the required parameter (TdParameter) for Select Statement and it will also generate the Update, Insert and Delete.

I am using .NET Data Provider for Teradata 13 which has Enhanced SchemaTable support when connected to Teradata Database 6.2 and above.