A DB-API 2.0 module for accessing data sources via Microsoft ADO
Questions tagged [adodbapi]
43 questions
7
votes
3 answers
How do I get the column names from a row returned from an adodbapi query?
Suppose I query a database like this :
import adodbapi
conn = adodbapi.connect(connStr)
tablename = "[salesLT].[Customer]"
cur = conn.cursor()
sql = "select * from %s" % tablename
cur.execute(sql)
result = cur.fetchall()
The result is, I think,…

Cheeso
- 189,189
- 101
- 473
- 713
6
votes
3 answers
Connecting to SQLServer 2005 with adodbapi
I'm very new to Python and I have Python 3.2 installed on a Win 7-32 workstation. Trying to connect to MSSQLServer 2005 Server using adodbapi-2.4.2.2, the latest update to that package.
The code/connection string looks like this:
conn =…

Vector
- 10,879
- 12
- 61
- 101
3
votes
2 answers
Ye olde UnicodeEncodeError printing results from a query on MS SQL with adodbapi
Python novice here.
I am using python2.7.2 on Windows7.
I have installed the PyWin32 extensions (build 217).
I have adopdbapi installed in c:\Python27\Lib\site-packages\adodbapi
I have a very simple module that queries the AdventureWorks2008LT…

Cheeso
- 189,189
- 101
- 473
- 713
3
votes
2 answers
Getting last inserted index mysql
I am using ADODB to connect to my database.
After I submit the query I want to get the ID of the last inserted row (from the query just inserted).
ADODB has an Insert_ID() function that should retrieve this is but it is not...
db->Insert_ID()
is…

kreynolds
- 426
- 4
- 15
3
votes
4 answers
Creating a SQL Server database from Python
I'm using Python with pywin32's adodbapi to write a script to create a SQL Server database and all its associated tables, views, and procedures. The problem is that Python's DBAPI requires that cursor.execute() be wrapped in a transaction that is…

JasonFruit
- 7,764
- 5
- 46
- 61
3
votes
1 answer
Unable to make database connection using python adodbapi library
I am trying to make SQL Server database connection using python library adodbapi and latest OLEDB provider using below code-
import adodbapi
import configparser
def try_connection():
_SERVER_NAME = "SERVERNAME"
_DATABASE = "TESTDB"
…

user2961127
- 963
- 2
- 17
- 29
2
votes
0 answers
ADODB Record set- How to fetch Record Asynchronously in between without loading all records into heap memory
I am using ADODB C++ for Execute Query like Select * from table. This table having the large data around 4GB. So when i Execute Query then it is fetching all the records and increase heap memory and load all the records on the client machine virtaul…

ginoyaha
- 51
- 2
2
votes
1 answer
Creating a connection to Vertica database in python using adodbapi
Does anyone know what are the parameters for creating a connection string to Vertica database using adodbapi? I cannot use pyodbc, because it does not work with IronPython.
I have tried:
connectorsver = ["DRIVER=Vertica ODBC Driver 4.1"]
…

Ziv Shapira
- 23
- 1
- 5
2
votes
3 answers
Convert list[adodbapi.apibase.SQLrow] to pd.DataFrame
Among sql-server connectors adodbapi is the only one that's working in my environment.
import adodbapi
conn = adodbapi.connect("PROVIDER=SQLOLEDB;Data Source={0};Database={1}; \
UID={2};PWD={3};".format(server,db,user,pwd))
cursor =…

shanlodh
- 1,015
- 2
- 11
- 30
2
votes
1 answer
How to retrieve the schema from MS Server Compact Edition (*.sdf) by using adodbapi?
I am trying to get the schema out of a database, before applying any queries from a local SQL Server Compact Edition file (*.sdf).
So far, I can connect to the database and perform queries when I know the schema.
I have tried two approached and both…

Christos Tsotskas
- 21
- 1
2
votes
1 answer
Loading, querying SQL Server CE 4.0 database files through Python
I am trying to load table from a SQL Server CE database (.sdf file format) into Python (3.5.1). Here is what I have been playing around with:
import adodbapi
file="C:\\TS\\20160406_sdfPyt\\HC.sdf"
connstr =…

tvns
- 31
- 1
- 5
1
vote
0 answers
Adodb using php with PostgreSQL - ADODB ASSOC_CASE not working
Trying below code
*require "./adodb.inc.php";
define('ADODB_ASSOC_CASE', ADODB_ASSOC_CASE_UPPER);
$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
$db = ADONewConnection('postgres');
$db->connect($host, $user, $password, $database);*
able to connect to…

sanket
- 25
- 4
1
vote
1 answer
DAX dates query in Python
I am running a DAX query within a Python script (using adodbapi) and would like to extract data from a table (called data) inbetween two dates (the field 'date_created'), however I am getting a syntax error.
tablestring =…

Sanch
- 367
- 2
- 11
1
vote
0 answers
SSAS MDX Query Within Python (adodbapi library) with dynamic Parameter '?'
I am using the adodbapi python library to query an SSAS Cube. Essentially, my goal is to ask the user to first input the Account Id. Then, I would like that to be passed as a parameter dynamically in the WHERE section of the query with a ? and…

David Erickson
- 16,433
- 2
- 19
- 35
1
vote
0 answers
Make SQL Server database connection using python with windows authentication
I am using adodbapi library for database connection to SQL Server.
My below connection string works perfect with SQL Server authentication-
config = configparser.ConfigParser()
config.read("C:/configsql.ini")
_SERVER_NAME =…

user2961127
- 963
- 2
- 17
- 29