Comments (3)
Have you tried
sql.WLongVarChar(xml);
As the xml parameter in Param array.
Is param[0] =sql.WLongVarChar(xml);
This should force the driver to bind the string
I'm away from terminal so cannot test currently.
I'll take a look later to see if this will fix it.
Sent from my iPad
On 26 Jul 2016, at 17:57, Dave Thompson [email protected] wrote:
Hey there,
I have noticed that trying to pass a XML string of over 2000 characters to a stored procedure as a parameter results in SQL returning "[Microsoft][SQL Server Native Client 11.0]Invalid precision value".
I suppose it's being truncated, but I can't find a way to stop this happening?
I'm just using:
procManager.callproc('SEL_GetDataByXml', parameters, function (err, result) {
Any advice?
Thanks!
Dave
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
from node-sqlserver-v8.
function largeText() {
console.log("largeText");
var len = 2200;
var s = "A".repeat(len);
sql.open(connStr, function (err, conn) {
conn.query("declare @s NVARCHAR(MAX) = ?; select @s as s", [sql.WLongVarChar(s)], function (err, res) {
//conn.query("declare @s NVARCHAR(MAX) = ?; select @s as s", [s], function (err, res) {
assert.ifError(err);
var ss = res[0].s;
assert(ss.length == len);
});
});
}
from node-sqlserver-v8.
That's how I got it to work in the end - sql.WLongVarChar(s)!
Thanks very much!
Dave
from node-sqlserver-v8.
Related Issues (20)
- Question: Using prepared query with Pool
- unable to build on CentOS7 HOT 3
- Prebuilt binaries for Node 20 / alpine HOT 3
- Cannot use without 'require'? HOT 1
- Module not found: Can't resolve '../build/Release/sqlserverv8' HOT 10
- Module did not self-register: sqlserverv8.node HOT 7
- npm install --save msnodesqlv8 fails MSBuild.exe failed with exit code: 1 HOT 5
- import { SqlClient } from "msnodesqlv8/types"; Cannot find module 'msnodesqlv8/types' or its corresponding type declarations HOT 1
- Unable to initialize msnodesql during Hot Module Reload (HMR) HOT 2
- Security vulnerability detected in latest HOT 1
- uncaughtException: Cannot read properties of null (reading 'query') HOT 3
- `ConcreteColumnType.parseSS` method tampers with plain date strings HOT 3
- Cannot find module '../build/Release/sqlserverv8.node' - Windows 10 / node.js v20.11.0/v21.6.1 HOT 1
- npm install results in LNK1127: library is corrupt HOT 1
- Uncaught Exception: static Sybase = new ServerDialect("Sybase")
- Cannot find module 'msnodesqlv8/types' or its corresponding type declarations. HOT 1
- [Question] What is the authentication detail if set trustedConnection to be true? HOT 2
- Missing binaries for Electron v28 and v29 HOT 6
- Unable to find dialect at msnodesqlv8/lib/sequelize HOT 7
- Execute system stored procedure HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-sqlserver-v8.