G
Guest
Hi again,
I created several datasets in a PPC project by dragging the table from the
server explorer into the dataset area. For several of them, I modified the
Fill command to do something a little more interesting that just get the
whole table.
One particular dataset is not working *when running on the ppc*. In 'My
computer' it's fine.
I modified the dataset's fill function to take two parameters, specified in
the query with @Parameter name.
The query is something like this:
"SELECT DataItem1, DataItem2 WHERE DataDate >= @Start AND DataDate <= @End"
The query works fine on My Computer but it's crashing the PPC with a generic
'SqlException' error. I am passing in fine DateTime objects for the @Start
and @End parameters of the Fill().
I found an older newsgroup posting that said Sql queries with parameters
need to use '?' instead of @Start and @End in the CE framework. I tried
replacing @Start and @End w/ '?' in the configure query dialog of the dataset
but whidbey complained when parsing.
Can I do parameterized queries with datasets on PPCs? Is there a workaround
that lets me still use the MS generated dataset code?
thanks again,
- Zack
I created several datasets in a PPC project by dragging the table from the
server explorer into the dataset area. For several of them, I modified the
Fill command to do something a little more interesting that just get the
whole table.
One particular dataset is not working *when running on the ppc*. In 'My
computer' it's fine.
I modified the dataset's fill function to take two parameters, specified in
the query with @Parameter name.
The query is something like this:
"SELECT DataItem1, DataItem2 WHERE DataDate >= @Start AND DataDate <= @End"
The query works fine on My Computer but it's crashing the PPC with a generic
'SqlException' error. I am passing in fine DateTime objects for the @Start
and @End parameters of the Fill().
I found an older newsgroup posting that said Sql queries with parameters
need to use '?' instead of @Start and @End in the CE framework. I tried
replacing @Start and @End w/ '?' in the configure query dialog of the dataset
but whidbey complained when parsing.
Can I do parameterized queries with datasets on PPCs? Is there a workaround
that lets me still use the MS generated dataset code?
thanks again,
- Zack