Replies: 1 comment
-
apologies, i do not really spend the time I once did on this driver for anyone coming here, looks like first thing to do is install an up to date driver not ancient one the driver is built using the odbc api. https://stackoverflow.com/questions/54373654/pypyodbc-error-associated-statement-is-not-prepared The error message you cited is produced by the ancient "SQL Server" ODBC driver that ships as part of Windows. A more up-to-date driver version like "ODBC Driver 17 for SQL Server" should produce a meaningful error message. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to run SP with JSON data as NVARCHAR(MAX) param:
await conn.promises.callProc('mySP', { json: '{"a":"about 4MB of JSON data"}' })
but I am getting
<ref *1> [Error: [Microsoft][SQL Server Native Client 11.0]Associated statement is not prepared] { sqlstate: 'HY007', code: 0, severity: 0, serverName: '', procName: '', lineNumber: 0, _results: AggregatorResults { beginAt: 2023-06-10T15:04:42.513Z, submittedAt: 2023-06-10T15:04:42.542Z, endAt: 2023-06-10T15:04:42.641Z, elapsed: 29, first: null, firstMeta: null, meta: [], metaElapsed: [], counts: [], results: [], output: [], info: null, errors: [ [Circular *1] ], options: AggregatorOptions { timeoutMs: 0, raw: false, replaceEmptyColumnNames: false }, rows: 0, row: null, rowRate: 0, sql: '{ ? = call mySP(@json = ?) }', returns: null } }
any ideas? I am using sql 2022 and 4.1.0 version of this lib
...
Procedure seems to run
I will reformulate - how to receive error message from the SP?
Beta Was this translation helpful? Give feedback.
All reactions