OleDb-demo
Demo code to connect to a DB via an OleDb connection. Call with CONNECTION_STRING
and QUERY
environment variables. The default values are missing
and should produce an error output if you forget to include them.
Example
CONNECTION_STRING="Provider=MS;Data Source=protocal://example.com/db;Initial catalog=db;User ID=user;Password=passord" QUERY="EVALUATE table" npm start
or
docker run --rm -it -e CONNECTION_STRING="Provider=MS;Data Source=protocal://example.com/db;Initial catalog=db;User ID=user;Password=passord" -e QUERY="EVALUATE table" oledb-demo:latest
Need help
This project isn't working. I assume I've setup the project work somehow. Appricate any effort getting this code to run without the following error:
Error: assembly specified in the dependencies manifest was not found -- package: 'Microsoft.CSharp', version: '4.5.0', path: 'lib/netstandard1.3/Microsoft.CSharp.dll'
/app/node_modules/edge-js/lib/edge.js:180
return edge.initializeClrFunc(options);
^
TypeError: edge.initializeClrFunc is not a function
at Object.exports.func (/app/node_modules/edge-js/lib/edge.js:180:17)
at Object.<anonymous> (/app/node_modules/oledb/index.js:2:19)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/app/src/index.js:3:15)
docker run --rm -it oledb-demo:latest dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.2.401
Commit: 729b316c13
Runtime Environment:
OS Name: debian
OS Version: 9
OS Platform: Linux
RID: debian.9-x64
Base Path: /usr/share/dotnet/sdk/2.2.401/
Host (useful for support):
Version: 2.2.6
Commit: 7dac9b1b51
.NET Core SDKs installed:
2.2.401 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download