Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. var updateOpMgrSql = edge.func('sql',{
  2. connectionString: GM_CONNECTION_STRING,
  3. source:function () {
  4. /*
  5. exec sp_III_UpdateOperMgr @quoteNumber,@poNumber
  6. */
  7. },
  8. });
  9.  
  10. var updateOpMgrSql = edge.func('sql',{
  11. connectionString: GM_CONNECTION_STRING,
  12. source:function () {
  13. /*
  14. exec sp_III_UpdateOperMgr @quoteNumber=@quoteNumberParam,@poNumber=@poNumberParam
  15. */
  16. },
  17. });
  18.  
  19. updateOpMgrSql({ quoteNumberParam: 10, poNumberParam: 15 }, function (error, result) {
  20. if (error) throw error;
  21. console.log(result);
  22. });
  23.  
  24. create procedure [dbo].[p_Test]
  25. @p nvarchar(max) = null
  26. as
  27. begin
  28. select * from [registration].[User]
  29. where UserName = @p
  30. end
  31.  
  32. var getUser = edge.func('sql', function () {
  33. /*
  34. exec [dbo].[p_Test]
  35. */
  36. });
  37.  
  38. getUser({p:'SomeUserName'}, function (error, result) {
  39. if (error) throw error;
  40. console.log(result);
  41. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement