pyodbc

Pyodbc on Mac connection issues

徘徊边缘 提交于 2020-01-17 08:31:32
问题 I have FreeTDS, unixODBC in my python 3.6.1 installation I'm trying to get pyodbc connected to my sql server (local VM) . I have tried the following to test configuration of freetds tsql -S servername -U pydata I get the following message Error 20012 (severity 2): Server name not found in configuration files. locale is "en_US.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" Error 20013 (severity 2): Unknown host machine name. There was a problem connecting to the server however

AWS Lambda connecting to SQL with Python and pyodbc

旧街凉风 提交于 2020-01-16 16:56:09
问题 I have an AWS Lambda that I want to connect to my on prem SQL server to read and write data from\to. I am using Python and pyodbc. I have got pyodbc installed (compiled zip file in an S3 bucket added to the lambda through a layer), but when I try and run this code I get an odd error: import boto3 import pyodbc s3 = boto3.client('s3') def lambda_handler(event, context): # print(help(pyodbc)) server = "Server" database = "Database" username = "AWS-Lamdba-RO" password = "Password" cnxn = pyodbc

Sql api is not supported for this database Error

假如想象 提交于 2020-01-16 09:11:32
问题 I'm trying to execute a query in Cosmo DB Mongo API, using the Cdata ODBC through Python. Below is the driver configuration: [CData ODBC Driver for Cosmos DB] Description=CData ODBC Driver for Cosmos DB 2019 Driver=/opt/cdata/cdata-odbc-driver-for-cosmosdb/lib/libcosmosdbodbc.x86.so UsageCount=1 Driver64=/opt/cdata/cdata-odbc-driver-for-cosmosdb/lib/libcosmosdbodbc.x64.so This is the code I'm using to make the query: import pyodbc cnxn = pyodbc.connect("DRIVER={CData ODBC Driver for Cosmos DB

Sql api is not supported for this database Error

南楼画角 提交于 2020-01-16 09:11:21
问题 I'm trying to execute a query in Cosmo DB Mongo API, using the Cdata ODBC through Python. Below is the driver configuration: [CData ODBC Driver for Cosmos DB] Description=CData ODBC Driver for Cosmos DB 2019 Driver=/opt/cdata/cdata-odbc-driver-for-cosmosdb/lib/libcosmosdbodbc.x86.so UsageCount=1 Driver64=/opt/cdata/cdata-odbc-driver-for-cosmosdb/lib/libcosmosdbodbc.x64.so This is the code I'm using to make the query: import pyodbc cnxn = pyodbc.connect("DRIVER={CData ODBC Driver for Cosmos DB

how to solve the connection problem with SQL Server

本小妞迷上赌 提交于 2020-01-16 08:44:27
问题 I am trying to connect to my SQL Server 2016 Database using pyodbc with django. In the SQL configuration manager i have all the network configurations as Enabled shared memory Named Pipes TCP/IP FireWall is turned OFF I tried using localhost and it worked fine but when I tried to connect to a server on the same network it did not work and displayed the below error: OperationalError at /connect/ ('08001', '[08001] [Microsoft][SQL Server Native Client 11.0]Named Pipes Provider: Could not open a

how to solve the connection problem with SQL Server

本秂侑毒 提交于 2020-01-16 08:44:01
问题 I am trying to connect to my SQL Server 2016 Database using pyodbc with django. In the SQL configuration manager i have all the network configurations as Enabled shared memory Named Pipes TCP/IP FireWall is turned OFF I tried using localhost and it worked fine but when I tried to connect to a server on the same network it did not work and displayed the below error: OperationalError at /connect/ ('08001', '[08001] [Microsoft][SQL Server Native Client 11.0]Named Pipes Provider: Could not open a

“transaction interface” error when updating table on linked server

孤者浪人 提交于 2020-01-15 11:05:12
问题 I'm getting this error when trying to update a db2 database that is a linked server on our SQL Server db. ERROR:root:('42000', '[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]The requested operation could not be performed because OLE DB provider "IBMDA400" for linked server "iSeries" does not support the required transaction interface. (7390) (SQLExecDirectW)') I am connecting to sql server via pyodbc and can run sql scripts with no issues. Here is the sql I get the error with sql3 =

“transaction interface” error when updating table on linked server

落爺英雄遲暮 提交于 2020-01-15 11:04:40
问题 I'm getting this error when trying to update a db2 database that is a linked server on our SQL Server db. ERROR:root:('42000', '[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]The requested operation could not be performed because OLE DB provider "IBMDA400" for linked server "iSeries" does not support the required transaction interface. (7390) (SQLExecDirectW)') I am connecting to sql server via pyodbc and can run sql scripts with no issues. Here is the sql I get the error with sql3 =

Convert list of pyodbc.rows to pandas Dataframe takes very long time

孤者浪人 提交于 2020-01-14 19:49:49
问题 Is there a faster way to convert pyodbc.rows object to pandas Dataframe? It take about 30-40 minutes to convert a list of 10 million+ pyodbc.rows objects to pandas dataframe. import pyodbc import pandas server = <server_ip> database = <db_name> username = <db_user> password = <password> port='1443' conn = pyodbc.connect('DRIVER={SQL Server};SERVER='+server+';PORT='+port+';DATABASE='+database+';UID='+username+';PWD='+ password) #takes upto 12 minutes rows = cursor.execute("select top 10000000

Inserting values into a Access 2003 database from a Python application using pyodbc

梦想与她 提交于 2020-01-14 19:10:34
问题 I've checked stackoverflow a lot in the past and have always been able to find what I've been looking for, but I just can't seem to get this one to work so I'm asking my first question. I'm not really a programmer, but I mentioned Python at work and now I have a Python project. I was actually getting everything figured out alright, but inserting values into a database is throwing me for a loop. The Basic Problem: I have a form built using Python and tkinter. When a button on the form is