Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

I was getting errors following the examples here, so I browsed the issues... #27

Merged
merged 1 commit into from

2 participants

@TeeJayGreen

... for clues. Then I found out the order of the parameters (name, type) had been swapped in addParameter(). I think I fixed them all, but I wasn't sure about line 88. Here's the comment saying they were swapped: #14 (comment)

@TeeJayGreen TeeJayGreen I was getting errors following the examples here, so I browsed the is…
…sues for clue. Then I found out the order of the parameters (name, type) had been swapped in addParameter(). I think I fixed them all, but I wasn't sure about line 88. Comment saying they were swapped: pekim#14 (comment)
aaabcc8
@pekim pekim merged commit 38153c1 into from
@pekim
Owner

Thank you very much for this.

@pekim
Owner

Line 88 should be ok. It matches the integration test at https://github.com/pekim/tedious/blob/master/test/integration/parameterised-statements-test.coffee#L182, and the tests in that file all pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 27, 2012
  1. @TeeJayGreen

    I was getting errors following the examples here, so I browsed the is…

    TeeJayGreen authored
    …sues for clue. Then I found out the order of the parameters (name, type) had been swapped in addParameter(). I think I fixed them all, but I wasn't sure about line 88. Comment saying they were swapped: pekim#14 (comment)
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 8 deletions.
  1. +8 −8 parameters.html
View
16 parameters.html
@@ -29,8 +29,8 @@
The parameters names used in this API do not include the '@'.
</p>
{% highlight javascript %}
- request.addParameter(..., 'name', ...);
- request.addParameter(..., 'age', ...);
+ request.addParameter('name', ..., ...);
+ request.addParameter('age', ..., ...);
{% endhighlight %}
<h2>Input Parameters</h2>
@@ -46,8 +46,8 @@
....
});
- request.addParameter(TYPES.VarChar, 'name', 'Fred');
- request.addParameter(TYPES.Int, 'age', 42);
+ request.addParameter('name', TYPES.VarChar, 'Fred');
+ request.addParameter('age', TYPES.Int, 42);
connection.execSql(request);
{% endhighlight %}
@@ -63,8 +63,8 @@
....
});
- request.addParameter(TYPES.VarChar, 'name', 'Fred');
- request.addParameter(TYPES.Int, 'age', 42);
+ request.addParameter('name', TYPES.VarChar, 'Fred');
+ request.addParameter('age', TYPES.Int, 42);
connection.callProcedure(request);
{% endhighlight %}
@@ -82,8 +82,8 @@
....
});
- request.addOutputParameter(TYPES.Int, 'number');
- request.addOutputParameter(TYPES.VarChar, 'string');
+ request.addOutputParameter('number', TYPES.Int);
+ request.addOutputParameter('string', TYPES.VarChar);
request.on('returnValue', function(parameterName, value, metadata) {
console.log(parameterName + ' = ' + value); // number = 42
Something went wrong with that request. Please try again.