Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass value

Status
Not open for further replies.

adugenet

Technical User
Feb 24, 2007
48
US
Is it possible to store this value in the paramter collection and pass to my query like below. for some reason it is not working for me ...please let me know how can i fix this. thanks
strState = ('AL','AR','AZ','CA','CO','CT','DC')


strState = "(" & strState & ")"
SqlDataSource1.SelectCommand &= "AND R.ASTATE IN :vState"
SqlDataSource1.SelectParameters.Add(":vState", strState)

 
can u try this to see if same results?

strState = "'AL','AR','AZ','CA','CO','CT','DC'"
SqlDataSource1.SelectCommand &= "AND R.ASTATE IN :)vState)"

might be a limitation of a parameter using a SqlDataSource...you might have to use dynamic sql in a stored procedure for better results...maybe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top