-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data source name not found and no default driver #97
Comments
@bgobi1991, Please provide the code you use to open the connection. This type of error is usually an indicator that something is wrong with your connection string. |
Hi wankdanker, Host is replace with my public ip
}); |
The MS Access driver is very touchy. Typically, Microsoft Office installs the 32-bit driver. It does not work with Node.js 64-bit. In order to get it to work, you must have the 64-bit MS Access driver. This unfortunately means you must uninstall MS Office 32-bit first if it is installed on your device. Then you must a) Install MS Office 64-bit EDIT: If you're using Node 32-bit, then the regular 32-bit MS Access driver should be fine and the issue is something else. |
Hi bzuillsmith, Thanks for your reply. I will try this method and let you know the status. |
I had this error trying to connect to a DB2 database from a Windows 7 machine. Try adding a Data Source Name to the connection string, if one is configured on your system. (i.e."DSN=MyDSN;UID=MyDatabase;..." Worked for me. |
Hello Team, and this is my code const sql = require("msnodesqlv8"); const connectionString = "server=CIMPLICITY;Database=CIMPLICITY;Trusted_Connection=Yes;Driver={SQL Server Native Client 11.0}"; sql.query(connectionString, query, (err, rows) => { |
@arunrout The module you are requiring (msnodesqlv8) is a different module than this (odbc). If you were using odbc your code should look something like: const db = require('odbc')()
const connectionString = "server=CIMPLICITY;Database=CIMPLICITY;Trusted_Connection=Yes;Driver={SQL Server Native Client 11.0}";
db.open(connectionString, (err) => {
if (err) {
throw err;
}
db.query('SELECT * FROM INDUS1', (err, rows) => {
if (err) {
throw err;
}
console.log(rows);
});
}); |
Thank you sir
…On Fri, Jun 22, 2018 at 6:37 PM, Dan VerWeire ***@***.***> wrote:
@arunrout <https://github.com/arunrout> The module you are requiring
(msnodesqlv8) is a different module than this (odbc). If you were using
odbc your code should look something like:
const db = require('odbc')()const connectionString = "server=CIMPLICITY;Database=CIMPLICITY;Trusted_Connection=Yes;Driver={SQL Server Native Client 11.0}";
db.open(connectionString, (err) => {
if (err) {
throw err;
}
db.query('SELECT * FROM INDUS1', (err, rows) => {
if (err) {
throw err;
}
console.log(rows);
});
});
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#97 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AgY90olS8-kE0QLw-GcdXYtAxQmnutPZks5t_OwugaJpZM4GBf3V>
.
|
Please let me know what I am missing here in the code const sql = require('mssql/msnodesqlv8') const sqlConfig = {
ConnectionError: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified |
@niyazhashmi1105 Looks like you're using |
Hi Team,
I got the error when connect the db. Please solve the issue
{ [Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified]
errors:
[ { message: '[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified',
state: 'IM002' } ],
error: '[node-odbc] SQL_ERROR',
message: '[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified',
state: 'IM002' }
The text was updated successfully, but these errors were encountered: