This is a migrated thread and some comments may be shown as answers.

SQL Parameters in TableAdapter

1 Answer 237 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mika
Top achievements
Rank 2
Mika asked on 06 Apr 2009, 12:48 PM
TableAdapter configuration wizard and QueryBuilder give confusing error messages when SQL parameters are used in a query.

If you don't declare a parameter in your SQL statement, the wizard tells that
Must declare the scalar variable @Parameter

On the other hand, if you put in a declare statement and open QueryBuilder, it gives you a syntax error:
The Declare SQL construct or statement is not supported

I don't know if this is something you guys can do anything about. You can get through the wizard by adding a parameter declaration and that's about it.

The real problem is that in order to get the report working, you have to manually remove the parameter from the DataSet designer file and add it to the DataSetTableAdapter Fill function. Otherwise, the report does not run.

Or is there a way to use TableAdapter wizard with SQL paremeters without touching the designer files?

-mika-


1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 08 Apr 2009, 02:09 PM
Hi Mika,

Please review the following forum thread for more info on the problem.

Sincerely yours,
Steve
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Mika
Top achievements
Rank 2
Answers by
Steve
Telerik team
Share this question
or