-
If the P is capitalized here:
dc.Command = 'DECLARE @remainingPays smallint ' + 'EXECUTE
"dbo"."VCS_SP_Remaining_Pays" \'' + HireDateV + '\', @Remainingpays
OUTPUT ' + 'SELECT @Remainingpays as RemainingPays';
Then it should be capitalized here:
var rp ...
-
The part that looks something like this:dc.Command =
'DECLARE @remainingPays smallint '
+
'EXECUTE "dbo"."VCS_SP_Remaining_Pays" \'' + HireDateV + '\', @remainingPays OUTPUT '
+
'SELECT @remainingPays as RemainingPays';Did you copy it exactly, or did you modify it somehow?
And ...
-
Where's the part where you're setting the query text?
-
Could you paste the section where you are currently seting the query text?
-
Up near the top of the JScript code, you should see a section where SelectionNamespaces is being defined. You'll need to add this line right after it:XDocument.DataObjects["PayPeriodsDataSource"].DOM.setProperty("SelectionNamespaces", ...
-
We use CabLib in our solutions when we need to programmatically fix up an InfoPath template. It's a free library for extracting and compressing .CAB files (.XSNs are essentially just .CABs).
Depending on how many of these templates you have to deal with, you may want to give CabLib a try. Or you could take a midway approach, ...
-
As I suspected, the form is not opening because of this line:
dc.Command = 'execute "dbo"."VCS_SP_Remaining_Pays" ', "{d \'" + HireDateV + "'}" ', ' + Remainingpays + ' output';
Here you have a comma where you should have a plus ...
-
To create an attribute field, just right-click any field in your data source (in the taskpane) and click "Add..." A dialog will come up that allows you to name the attribute and create it.
To create attributes with the same name in more than one place, right-click the attribute you want to reuse, select ...
-
I'm pretty sure you're going to need to do the {d ...} thing in order for SQL to accept the date unless that field is a string-type field in the database. Maybe there was a missing quotation mark somewhere preventing the form from opening.
It looks like you're missing a space before output. Try using ' ...
-
Not the easiest solution, but what you can do is add an attribute called changed to all the fields whose changes you want to track. Then create a rule on each of these fields like this:
Condition: Mode = "Amendment"
Action: Set changed to "true"
This rule should fire any time one of the fields is changed while the ...