G
Guest
Hi people,
I have a question that nobody as of yet has been able to answer for me.
I have an SQL query which is:
SELECT sum(TimeSpent) AS TimeSpentDWR
FROM DWRWork
WHERE DWRID = @DWRID
When I provide the parameter, it sums the timespent field OK.
Now in VB.Net (2003) I am unable to do this. I have created a DataAdapter
with a select command of above, and generated the DataSet.
Within my form load, I have the line:
SqlSelectCommand11.Parameter("@DWRID").Value = lblDWRID.text
When I try to run the form, I get "System Error" from debug, but if I run
the form without debugging, I then get the error within the program telling
me that the parameter @DWRID has not been provided.
Does anybody have any solution to this? I need to sum two fields up onto
one form, and at the moment I can't even get one to work - I'm new to
programming and this is my first project, so is getting a bit depressing at
the moment as it's been a problem for a few months!
Thanks for your help.
I have a question that nobody as of yet has been able to answer for me.
I have an SQL query which is:
SELECT sum(TimeSpent) AS TimeSpentDWR
FROM DWRWork
WHERE DWRID = @DWRID
When I provide the parameter, it sums the timespent field OK.
Now in VB.Net (2003) I am unable to do this. I have created a DataAdapter
with a select command of above, and generated the DataSet.
Within my form load, I have the line:
SqlSelectCommand11.Parameter("@DWRID").Value = lblDWRID.text
When I try to run the form, I get "System Error" from debug, but if I run
the form without debugging, I then get the error within the program telling
me that the parameter @DWRID has not been provided.
Does anybody have any solution to this? I need to sum two fields up onto
one form, and at the moment I can't even get one to work - I'm new to
programming and this is my first project, so is getting a bit depressing at
the moment as it's been a problem for a few months!
Thanks for your help.