Sheikh Rahat Ali
Sheikh Rahat Ali

Reputation: 1333

Pass string parameter to SqlDataSource in asp.net

i have placed a SqlDataSource component on my aspx page but while configuring the SqlDataSource in the "Test Query" Step I am passing the following parameters :

alt text

But when i click ok it returns following error:

alt text

This error occurs when i pass the string :

INFO, WARN, ERROR,

I have tried a lot of combinations but nothing works. It works only if i pass one of the three words in single quotes like this :

'ERROR'

Infact the INFO WARN and ERROR are the various levels available in the table. Each record can have only one level and in the sql query i am using IN("-----") to match the criteria, hope you understand.

Any idea to pass the string with comas between them will be highly appreciated.

Upvotes: 0

Views: 1657

Answers (2)

Sheikh Rahat Ali
Sheikh Rahat Ali

Reputation: 1333

I have resolved the problem by passing each level in single quotes without , after the last level as shown in the image below:

alt text

Anyway thanks for your help Aristos!

Upvotes: 0

Aristos
Aristos

Reputation: 66641

After you create the page with the dialogue helpers, just switch to code view of your html and change them by hand on the created code...

Upvotes: 1

Related Questions