Connect to ASE sybase in Robotframework - robotframework

I am trying to connect to ASE sybase using below but cannot:
connect To Database Using Custom Params pyodbc "Driver={Adaptive Server Enterprise}; server=; port=;db=;uid=; pwd=;"
I have installed "pyodbc" using ‘pip install pyodbc’.

If you are getting error something like - ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Its probably your installation is no complete - Follow below steps
Install -
I:\Apps\Sybase_OpenClient_15.5_0_ESD8x64_DTP_v1.0\Sybase_OpenClient_15.5_0_ESD8x64_DTP_v1.0.msi
Insure environment variables/PATH is set
This should work.

Related

Simba Athena ODBC: unable to use SQLGetPrivateProfileString functions

This is very strange, I want to setup a connection from RStudio to my instance in AWS Athena.
I am using unixodbc as the driver manager, and succeded by testing the connection using isql -v 'Simba Athena'. However, when I test the connection in RStudio with...
con <- DBI::dbConnect(
odbc::odbc(),
"Simba Athena"
)
... it gives me the error Error: nanodbc/nanodbc.cpp:1021: 00000: [Simba][ODBC] (11560) Unable to locate SQLGetPrivateProfileString function.. Any clue about it, I am a bit stuck.
It is basically not finding the correct ODBC driver. Simba by default references the driver in its /Library/simba/athenaodbc/lib/simba.athenaodbc.ini setup file to libodbc.dylib but it should be libodbcinst.dylib. At least in MacOS.
This solved my problem.
I got the same error when I link with static library of "libodbc.a", however I can succeed to connect when I change to link with dynamic library of "libodbc.so"

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

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.

MySQL connection string for 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

How can I connect to a sqlite3 db using pyodbc and unixODBC?

I can't figure out how to connect to a sqlite db using pyodbc. I have a DSN set up and can connect to it via isql without problems.
isql -v TEST
works like a charm, However
import pyodbc
pyodbc.connect('DSN=TEST')
Gives the following error message:
pyodbc.Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnectW)')
I also tried a great amount of permutations of the connection strings in the examples at https://code.google.com/p/pyodbc/wiki/GettingStarted to no avail.
pyodbc.dataSources()
Does list the dsn I'm trying to connect to with the value holding the path to libsqlite3odbc.so
I assume I am missing something obvious, but I can't figure out what...
EDIT: Using unixODBC 2.3.0, python 2.7.1, sqliteodbc 0.88 and pyodbc 2.1.8
EDIT: The reason I want to use pyodbc is for portability to Windows and MS Access
Just to check what is being passed to the driver manager, turn on ODBC tracing, in your odbcinst,ini file add
[ODBC]
Trace = Yes
TraceFile = /tmp/sql.log
Then run the app again and see what is being passed to the SQLConnect or SQLDriverConnect call.

Resources