Table Adapter parameters

  • Thread starter Thread starter Ron
  • Start date Start date
R

Ron

I was successfully calling a TableAdapter.Fill command in code which was tied
to an SQL stored procedure. I changed the stored procedure to include two
additional parameters and it stopped working in code. The stored procedure
works when previewing it in the dataset designer. But the line of code comes
up with an error stating 'Expression Expected' and the comma after the first
parameter is underlined. Can't find the problem. I only added three
additional parameters in the stored procedure which I include on the line of
code but no dice. Any ideas? Here is the line of code:

Me.SpWPJOs_TableAdapter.Fill(Me.DsWPJOs.spWPJOs, 'Pending', blWPsCompleted,
'1/1/2007', '12/31/2007')
 
Hello Ron,
I was successfully calling a TableAdapter.Fill command in code which
was tied to an SQL stored procedure. I changed the stored procedure
to include two additional parameters and it stopped working in code.
The stored procedure works when previewing it in the dataset designer.
But the line of code comes up with an error stating 'Expression
Expected' and the comma after the first parameter is underlined.
Can't find the problem. I only added three additional parameters in
the stored procedure which I include on the line of code but no dice.
Any ideas? Here is the line of code:

Me.SpWPJOs_TableAdapter.Fill(Me.DsWPJOs.spWPJOs, 'Pending',
blWPsCompleted, '1/1/2007', '12/31/2007')


You need to reconfigure the tableadapter so that it will pick up the new
parameters.

I usually go about that by removing the original function from the designer
and addign it again. There are ways tto update the exiting function, but
it's usually easier to re-do the whole thing. Instead fof generating new
SP's, choose an existing SP from the dropdown.
 
Back
Top