Node.js native driver for SAP SQL Anywhere databases, supporting direct execution, prepared statements, and connection pooling. Latest version 1.0.27 supports Node.js 5–12, but development appears stalled with no releases since 2019. Requires native compilation via node-gyp; prebuilt binaries only for Windows 64-bit. Compared to generic ODBC drivers, this offers tighter integration with SQL Anywhere-specific features like auto-starting databases and connection properties, but at the cost of limited platform and Node version support. The API is callback-based; no Promise or async/await support.
npm install sqlanywhereNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connect to a SQL Anywhere database and execute a parameterized query with a callback.
Install node-gyp and ensure SQL Anywhere SDK is available. Alternatively, use a cross-platform ODBC driver.
Use an older Node.js version (12.x) or migrate to a maintained driver like tedious (for MSSQL) or ODBC.
Check the documentation for the type of statement being executed; handle all three cases in your callback.
Upgrade Node.js to at least 5.x (max 12.x) or pin to sqlanywhere@1.0.23.
Ensure build tools are installed (node-gyp, Python, C++ compiler) and run 'npm rebuild sqlanywhere'. On Windows 64-bit, reinstall the exact version with npm.
Verify server name or Host, and ensure the database server is accessible. For local databases, use DatabaseFile with AutoStart: 'YES'.
Ensure you use 'const sqlanywhere = require('sqlanywhere');' and then 'const conn = sqlanywhere.createConnection();'. The exec method is only available after createConnection.No dependency data recorded yet.