MySQL connection string for ASP.NET - asp.net

I have a ASP.NET application running in VS2008 and i have ODBC connection in web.config file.
I am using 64bit Windows 7 machine.
I am trying to connect it with my MYSQL workbench but it shows me the following error:
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified
and i am using the following connection string :
add name="dbConnectionString" connectionString="DRIVER={MySQL ODBC 5.2w Driver};server=localhost;User Id=root;database=dbname; providerName="System.Data.Odbc"
Please let me know what i am missing ?
Thanks in advance

You need to install MyODBC which is MyODBC 5.2 in your case.. Or you can use whatever MYODBC Driver is installed.. just change your DRIVER in the connection string accordingly

Related

pyodbc DSN-less connection with AS400 / IBM midrange

I want to connect via pyodbc with a AS400 Database.
I configured it via the DSN syntax and it is working, but I need it DSN less.
This my current code:
connection = pyodbc.connect(
driver='{iSeries Access ODBC Driver}',
system='192.***.***.***',
uid='U******',
pwd='p0*****')
But always I got the error:
('HY000', '[HY000] [IBM][System i Access ODBC Driver]Missing system name needed for connection. (30188) (SQLDriverConnect); [HY000] [IBM][System i Access ODBC Driver]Missing system name needed for connection. (30188)')
I already tried it with the older driver "IBM i Access ODBC Driver" but same error is comming up.
Did someone also had this error?
Thanks
in my case - I just need to use capital letters for the functions variables:
connection = pyodbc.connect(
DRIVER='{iSeries Access ODBC Driver}',
SYSTEM='192.***.***.***',
UID='U******',
PWD='p0*****')

Error when trying to connect to Teradata as source using Attunity

I am getting the following error when I try to connect to Teradata as source using attunity
"SYS-E-HTTPFAIL, Cannot connect to ODBC provider Fatal error has occurred."
I have restarted Attunity console and server
screenshot of the error
I confirmed that Teradata ODBC is installed and I can connect to Teradata
There are multiple reasons for these errors:
1- In my case I needed to update the environment variable and ensure to enter the correct path to Teradata ODBC driver
2- Other reasons for the error is ensure you are running a 64 bit ODBC driver matching Attunity 64 bit download

pyodbc cannot connect whereas similar connection works with RODBC

I try to connect to my DB with the following request:
import pyodbc
connectionString = "driver={Adaptive Server Enterprise};database=#DB#;Server=#Server#;port=#port#;UID=#UID#;PWD=#PWD#;"
pyodbc.connect(connectionString)
However I get the following error, as if my connection string is not correct:
Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source
name not found and no default driver specified (0)
(SQLDriverConnect)')
Which is strange, since I managed to connect to my DB in R with ROBC module.
library(RODBC)
ch = odbcDriverConnect(connection = connectionString)
Any idea what is wrong with my connection string in pyodbc ?
I resolved my problem, the request is working with 32-bits python interpreter.
It appears not to be 64bits compatible.
Similar topic here: cannot connect to 64bit MsAccess database with 64bit Python 3.6.ODBC Driver Error

Connecting to MS Access Database from R (x64)

I am trying to access my Access database using R. I have tried the below options but I am not able to connect to the database. I am using 64 bit R and 64 bit Access. I am using windows 7 also.. :(
library(RODBC)
db <- "E:/testdb.accdb"
myconn <-odbcDriverConnect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=E:/test.accdb")
con2 <- odbcConnect(db)
channel <- odbcConnectAccess("E:/testdb")
I always get the error. Please help me.
1: In odbcDriverConnect("DSN=E:/testdb.accdb") :
[RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
2: In odbcDriverConnect("DSN=E:/testdb.accdb") : ODBC connection failed
I think the problem is as error message suggests - you don't have x64 Microsoft Access driver installed. Check it in Control panel - ODBC Data Sources (x64) on the Drivers tab. If it's not there, try to install Microsoft Access Database Engine 2010 Redistributable.

Connection between Lotus Notes and PostgreSQL

I want to connect to a Postgres Database with Lotus Notes 8.5.3 in win32 server. I tried to install Pg odbc driver 9.3 and the odbc connection is successful when i launch it in odbcad32. But it doesn't work through the domino server with ndctest command , i have this message error : "Data source name not found and no default driver specified" . Does anyone have an idea about this?
Problem resolved , the odbccad32 where i should configure my ODBC connection should be in SysWOW64 and not in System32. I don't know why but it's Microsoft.

Resources