sails-mssqlserver | Microsoft SQL Server Adapter for sails.js | SQL Database library
kandi X-RAY | sails-mssqlserver Summary
kandi X-RAY | sails-mssqlserver Summary
Microsoft SQL Server Adapter for sails.js
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of sails-mssqlserver
sails-mssqlserver Key Features
sails-mssqlserver Examples and Code Snippets
Community Discussions
Trending Discussions on sails-mssqlserver
QUESTION
The connection to mssql server is established but when i try to execute the .query() method , i am not able to get any result.The page keeps on loading and doesn't get any response from database.
The following is my connection.js:
...ANSWER
Answered 2018-Feb-22 at 04:46Turns out, all i had to do was add
QUESTION
I'm learning Sails JS (and NodeJS), and I'm trying to set a connection to SQL Server Express. What I have so far:
A database called test-project-db
with a table inside called TestTable1
. It has two columns: name varchar(20)
and description varchar(100)
.
A sails project generated with sails new
, and a model/component made with sails generate api TestTable1
.
My files: - api/models/TestTable1.js
...ANSWER
Answered 2018-Feb-01 at 00:14localhost:undefined
--> The port is undefined because you didn't provide it in the configuration. Add in the port
attribute into your sqlserver
connection within config/connections.js
, and assign it your database server's port.
Side note: learning Sails while learning Node is quite a handful, especially since Sails can look intimidating at first. Just take it piece by piece, and you'll definitely get a hang of it. If you're familiar with MVC frameworks, such as Rails, then Sails will feel right at home.
QUESTION
I am using sails js with it sails-mssqlserver adapter. The problem with it is that if my stored procedure returns multiple result sets then I only receive one result set which is the latest of all. The same stored procedure is working fine with Java and I get to iterate over the relevant result sets.
I need to know if there is some specific way to access all result sets in sails-mssqlserver?
...ANSWER
Answered 2018-Jan-05 at 11:21The sails-mssqlserver adapter is a wrapper of the official Microsoft SQL Server client for Node.js available here its dependecy however is not on the latest release.
Option 1: As per this official documentation of the MsSQL package, you can enable multiple recordsets in queries with the request.multiple = true command.
To enable multiple queries/recordsets in the sails-mssqlserver adapter, a hackish workaround is to open sails-mssqlserver/lib/adapter.js and edit the raw query function. Adding request.multiple = true below var request = new mssql.Request(mssqlConnect). As shown in the example below.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sails-mssqlserver
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page