J
Jay Bryan
Using VS2005 Pro and dotnet 2.0
I am trying to add parameters in the query builder tool while configuring my
data adapter using the data adapter configuration wizard. I right-click
somewhere on the builder pane and then select properties. At the bottom of
the properties window, there is a line that says 'Query Parameter
Identification'. I click the ellipses to the right and I have three items to
change - Prefix characters, Suffix characters, Escape characters. I put a
Prefix character in the box (In this case I have tried the @ and % symbols),
click ok and close the properties box. So far so good.
Then in the filter column for the row I want to filter, I put the parameter
name I want - in this case @UserID. The builder puts an '=' sign in front.
Again, everything is fine.
I click the Execute query button at the bottom left and the builder asks me
for the parameter data. I input '222' and click ok. I get the results I was
expecting. Great! But now the problem starts.
I click Ok to exit the builder then click next on the data adapter
configuration wizard. I get the following error:
Generated Select statement
Error in WHERE clause near '@'
Unable to parse query text.
When I click finish, I get a message box saying "An unexpected error has
occurred. Error Message: Object reference not set to an instance of an
object."
I can't seem to get it to accept my parameters even though when I execute
the query within the builder, everything works as expected. Has anyone had
this same problem or can you recreate it?
Thanks,
Jay
I am trying to add parameters in the query builder tool while configuring my
data adapter using the data adapter configuration wizard. I right-click
somewhere on the builder pane and then select properties. At the bottom of
the properties window, there is a line that says 'Query Parameter
Identification'. I click the ellipses to the right and I have three items to
change - Prefix characters, Suffix characters, Escape characters. I put a
Prefix character in the box (In this case I have tried the @ and % symbols),
click ok and close the properties box. So far so good.
Then in the filter column for the row I want to filter, I put the parameter
name I want - in this case @UserID. The builder puts an '=' sign in front.
Again, everything is fine.
I click the Execute query button at the bottom left and the builder asks me
for the parameter data. I input '222' and click ok. I get the results I was
expecting. Great! But now the problem starts.
I click Ok to exit the builder then click next on the data adapter
configuration wizard. I get the following error:
Generated Select statement
Error in WHERE clause near '@'
Unable to parse query text.
When I click finish, I get a message box saying "An unexpected error has
occurred. Error Message: Object reference not set to an instance of an
object."
I can't seem to get it to accept my parameters even though when I execute
the query within the builder, everything works as expected. Has anyone had
this same problem or can you recreate it?
Thanks,
Jay