Giter Site home page Giter Site logo

edge-sql's People

Contributors

agracio avatar atifaziz avatar jchannon avatar mfcollins3 avatar ryan-allen avatar tjanczuk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

edge-sql's Issues

Unable to resolve project when using CoreCLR

Attempting to use the edge-sql component to query a stored procedure, async is a must so have spent time getting CoreCLR to work in our environment.

Can you suggest why this might be?

Unable to resolve project from /opt/app/node_modules/mssql-nix/node_modules/edge-sql/lib

The only thing I can think of is functionality is encapsulated in a npm dependency, do you think this would be a problem?

Odd connection string behavior

I am finding that a connection string fails when using a server name with a slash in it.

For instance Server=servername;Database=dbname;Integrated Security=True works but Server=servername\secondpart;Database=dbname;Integrated Security=True does not work. The response is error: 40 - Could not open a connection to SQL Server.

The error response is more or less "The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections".

What is odd is that even if my server is servername\secondpart, if I put just servername in the connection string, it will connect to servername\secondpart.

I'm happy to provide more explanation, but that is all I'm really seeing.

How to format the string request in order to execute a stored procedure that requires parameters

If I change the stored procedure to not use parameters and just send exec sp_III_UpdateOperMgr it executes properly.Otherwise if it requires parameters I get an error**"Could not find stored procedure 'sp_III_UpdateOperMgr @quoteNumber,@poNumber'."**

Below is the javascript.

var updateOpMgrSql  = edge.func('sql',{
    connectionString: GM_CONNECTION_STRING,
    source:function () {
        /*
         exec sp_III_UpdateOperMgr  @quoteNumber,@poNumber
         */
    },
});

New windows opened when SQL is executed

I have a project which uses Edge-SQL quite successfully, but if I launch my edge-sql script in the background (bash: "node myapp.js &"), whenever the SQL code is executed on my windows machine, a new (presumably DOS) window pops up for just a moment.

It's a bit annoying that it flickers on my screen, but the more irritating issue is that it steals keystrokes. (If I'm typing rapid-fire at the moment the window pops up, all of the keys I hit while the window is open are not sent to my editor.)

This also happens if I run my process using PM2 (http://pm2.keymetrics.io/)

Has anyone else seen something like this? Any suggestions for how to at least make those windows open minimized and not capture focus?

Thanks!

Cast to integer fails when a column is declared as smallint in SQL SERVER

Hello there,

When a column is declared as "smallint" in SQL SERVER, we get a "short" back in C#. And trying to cast in back to "int" fails since it got encapsulated as an "Object" in EdgeCompiler.cs.

Ex.:

 short aNumber = 9;
 object o = aNumber;
 int number = (int)aNumber; // -> fails;

To adress it, we've to add

                    else if (type == typeof(short))
                    {
                        resultRecord[i] = (int)(short)resultRecord[i];
                    }

in compiler.cs.

Hope, it helps.

Stored procedure support

When I read the source code, I noticed it has support for executing stored procedures which was added in Nov 2013. I tried it out and it seems to work fine in my test cases.

Before I go ahead and commit to using this functionality, I was wondering if there are additional reasons why this hasn't yet been advertised in edge's documentation.

Appreciate it.

Alex

SqlCommand Properties

I would like to be able to set properties of the SqlCommand object, such as CommandTimeout (see https://msdn.microsoft.com/en-us/library/System.Data.SqlClient.SqlCommand(v=vs.110).aspx) I am willing to make the modifications and submit PR but would like some input on how best to pass them in. One thought is to use a special named parameter like _CommandProperties and do not load it in the AddParameters function but process it after the command is created in the ExecuteQuery function.... Thoughts?

SQL Geometry Type

When attempting to select a field of Geometry type within a query, the execution fails returning an error of "Data is Null."

Detailed error:

{ Error: Data is Null. This method or property cannot be called on Null values.
    at Error (native)
  Message: 'Data is Null. This method or property cannot be called on Null values.',
  Data: {},
  InnerException: null,
  TargetSite: {},
  StackTrace: '   at System.Data.SqlTypes.SqlDouble.get_Value()',
  HelpLink: null,
  Source: 'System.Data',
  HResult: -2146232015,
  message: 'Data is Null. This method or property cannot be called on Null values.',
  name: 'System.Data.SqlTypes.SqlNullValueException' }

Ubuntu 14.04 with mono failing to execute simple query

I am executing a simple query on a remote SQL Server Database using this code:

var edge = require('edge');

var CONST_CONNECTION = "Data Source=10.6.65.233;Initial Catalog=MyDB;User Id=remote; Password=remote;";

var selectAll = edge.func('sql', {
connectionString: CONST_CONNECTION,
source: function () {
/*
SELECT * FROM dbo.UserName
*/
}
});

selectAll(null, function(err, result) {
if (err) { console.log("error "); return;}
console.log(result);
});

When I execute this query I get the following error :

Missing method System.Data.SqlClient.SqlCommand::ExecuteReaderAsync(CommandBehavior) in assembly /usr/local/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll, referenced in assembly /home/merca/login/oauth-server/node_modules/edge-sql/lib/edge-sql.dll

I have run npm test in the edge module and I get 69 tests complete (11 seconds), as far as I can see edge-sql does not have any tests.

I am running on Ubuntu 14.04 with Mono JIT compiler version 3.4.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.