Re: [DB-SIG] SQL CONNECTION

2016-01-03 Thread Andy Todd
On 31/12/2015 1:31 AM, Dale Wheeler wrote: Hi- Can you help? I am trying to connect to SQL Anywhere (v9) with iPython Ananconda. I am on a Windows 7 PC and both Python and SQL are installed locally. Is this at all possible or do i need to upgrade my version of SQL? Many thanks Dale ___

Re: [DB-SIG] dsn syntax

2014-08-20 Thread Andy Todd
On 21/08/2014 2:58 am, Wilson, Derek S wrote: What is the proper syntax for DSN? Is it only host:database or is there some other way to specify a DSN? Thanks, *Derek Wilson * *Implementation Analyst* ** *Relay**Health* Scottsdale, AZ 85251 480.663.4767 Office derek.wil...@relayhealth.com

Re: [DB-SIG] Getting a list of tables from a database

2012-05-14 Thread Andy Todd
On 15/05/12 12:06 PM, Vernon Cole wrote: Eddy: As you discovered, every different database system has a unique way of getting a table listing. The problem with attempting to make a uniform tool for doing that at the PEP 249 level, is that some api packages (such as the one I maintain for Micr

Re: [DB-SIG] Cannot connect to Mysql DB when I try to start a Python script from PHP page.

2011-01-18 Thread Andy Todd
On 18/01/11 1:20 PM, Watson Xu wrote: Hi, I created a PHP page and one Python script. Please see the following in blue for the PHP source code and the Python script. When I launch the PHP page in IE to start the python script, the python script give me the error information shown as blow, please

Re: [DB-SIG] Reuse of DB-API 2.0 cursors for multiple queries?

2009-01-29 Thread Andy Todd
M.-A. Lemburg wrote: On 2009-01-29 21:15, Alex Willmer wrote: (Reposted to DB-SIG from clp) This week, I used the adodbapi module against an SQL Server Express database. I was surprised to get an exception, when I attempted to submit a second query with my cursor object. The full session is bel

Re: [DB-SIG] newbie question on trapping a DB error message using psycopg2 / DB-API

2008-10-16 Thread Andy Todd
Chris Wood wrote: If I run a python program that calls a stored procedure without a "try:" , I see a descriptive message in the error that is returned (highlighted in yellow below): >>> cur.execute("select * from f_test_return_error2('normon')") Traceback (most recent call last): File "", l

Re: [DB-SIG] MySQL

2008-06-09 Thread Andy Todd
Tariq Momani wrote: Hello How I can access MySQL by python in windows XP Best regards Tariq Momani Redirecting to the db-sig mailing list, where the collected wisdom of the community can help you out. Regards, Andy -- From the desk of Andrew J Todd esq - http://www.halfcooked.com

Re: [DB-SIG] Managing My Database Connections

2008-03-19 Thread Andy Todd
Gerhard Häring wrote: > Robert Rawlins - Tamed Technology wrote: >> Essentially I only have a single database attached to my application >> but I’m looking for the best way to handle its connection so thought I >> would come and get your thoughts and opinions. >> Within my applications I’ll have

Re: [DB-SIG] Is this the right place?

2008-03-12 Thread Andy Todd
Robert Rawlins wrote: > Morning guys, > > > > I’m looking for a users mailing list for the DB-API to ask a few > questions about how it is best implemented into my application, is this > the best place to send these sorts of questions too or do you have a > users mailing list? > > > > Th

Re: [DB-SIG] db to db layout analysis

2008-01-31 Thread Andy Todd
Lukasz Szybalski wrote: > Hello, > I just came across this database with over 60 tables and I need some > tool to analyze the tables. (find out keys, fields, properties, show > me relation to other tables etc.) > > You guys know of something similar? python or not, command line or not > > Thanks,

Re: [DB-SIG] How to escape special field name, mysql?

2007-08-07 Thread Andy Todd
Lukasz Szybalski wrote: > On 8/7/07, Carsten Haese <[EMAIL PROTECTED]> wrote: >> On Tue, 2007-08-07 at 13:06 -0500, Lukasz Szybalski wrote: >>> On 8/7/07, Carsten Haese <[EMAIL PROTECTED]> wrote: On Tue, 2007-08-07 at 11:58 -0500, Lukasz Szybalski wrote: > Hello, > I have installed mys

Re: [DB-SIG] I wonder if there are module, class to perform table copy ?

2007-08-03 Thread Andy Todd
KLEIN Stéphane wrote: > Le Wed, 01 Aug 2007 11:27:39 -0400, Carsten Haese a écrit : > >> On Wed, 2007-08-01 at 14:49 +, KLEIN Stéphane wrote: >>> Hello, >>> >>> I wonder if there are module,class to perform table copy ? Coping table >>> structure and/or table data from one database to other or

Re: [DB-SIG] Other extensions

2007-07-21 Thread Andy Todd
Michael Bayer wrote: > On May 15, 2007, at 3:29 PM, Michael Bayer wrote: > >> DBAPI needs to remain as the most minimal layer of standardization >> possible (and i think it should remain about SQL. to support other >> query languages would invariably require much richer APIs)...it just >> would b

Re: [DB-SIG] cx_Oracle: getting names of present TNS entries

2007-02-10 Thread Andy Todd
Harald Armin Massa wrote: > Hello, > > is there a fine method to query the defined TNS-names on a computer? > > with "fine" I am asking for something higherlevel then "find > tnsnames.ora, parse it" > > Harald > > > -- > GHUM Harald Massa > persuadere et programmare > Harald Armin Massa > Re

Re: [DB-SIG] Accessing oracle from remote machine

2007-01-10 Thread Andy Todd
Sean Davis wrote: > On Wednesday 10 January 2007 02:31, Andy Todd wrote: >> Sean Davis wrote: >>> I am new to the list, so if I am in the wrong place, feel free to direct >>> me elsewhere. >>> >>> I am trying to connect to an Oracle installation o

Re: [DB-SIG] Accessing oracle from remote machine

2007-01-09 Thread Andy Todd
Sean Davis wrote: > I am new to the list, so if I am in the wrong place, feel free to direct me > elsewhere. > > I am trying to connect to an Oracle installation on a remote machine. I have > installed the oracle instant client on my machine (linux x84_64) and can > connect via Oracle's sqlp

Re: [DB-SIG] How to pass parameter with LIKE

2006-10-25 Thread Andy Todd
Janice Sterling wrote: > I am trying to use a sql query where i'm passing a parameter > > sql_str = "SELECT mrc_code FROM blocks where mrc_code LIKE '%s'" % (blkfld) > > where blocks would be 31103a1, 31103e1, 31103a5, 31103e5 > > >

Re: [DB-SIG] New take on PostgreSQL bindings for Python

2006-09-27 Thread Andy Todd
Cristian Gafton wrote: > On Wed, 6 Sep 2006, Andy Chambers wrote: > >> could implement this themselves and instead of writing >> >> "select * >> from table >> where param = $1" >> >> ..they write this >> >> "select * >> from table >> where param = %s" % (aparam(),) >> >> Then if you change datab

Re: [DB-SIG] cx_Oracle - any way to change the user of a connection?

2006-08-26 Thread Andy Todd
Harald Armin Massa wrote: > I want to have a connections which stays activated: > > cn=cx_Oracle.connect("dataset", "lowprivuser", "password") > > > and change the user of that connection. > > Reason: I want to have a web application, which connects ONE TIME (per > process/thread) to Oracle, a

Re: [DB-SIG] Mysql query

2006-08-04 Thread Andy Todd
Patricia G. wrote: > Hi Andy, > > > Having a generic table with key value pairs like your current info > table > just leads to some really horrible SQL as you are currently finding. > > > > I agree with you . > > Unless you truly don't know what key-value pairs you are going t

Re: [DB-SIG] date/time handling

2006-08-03 Thread Andy Todd
Christoph Zwerschke wrote: > Hello all, > > trying to improve date/time handling in PyGreSQL we stumbled over the > following questions: > > 1) Should mx.DateTime still be preferred over stdlib datetime (if both > are available)? Or should we handle it the other way around meanwhile? > > 2) We

Re: [DB-SIG] Mysql query

2006-08-03 Thread Andy Todd
Patricia wrote: > Hi all, > > I'm having a hard time trying to create this query. > I have two tables: > log - columns: id, name and date > info - columns: id, tag, value > > i.e.: > log > id | name | date > - > 1 | machine_name | 07/

Re: [DB-SIG] Question about MySQL insert function

2006-07-30 Thread Andy Todd
Kiwi Golf wrote: > Hi Andy, > > I run the code (.py) without any error message however when I go back to > MySQL server, and try to check whether the data was inserted into MySQL, > I got empty set from the db. My system is Python 2.4, MySQL 5.0, and > MySQLdb(MySQL-python.exe-1.2.1_p2.win32-py

Re: [DB-SIG] Question about MySQL insert function

2006-07-30 Thread Andy Todd
Kiwi Golf wrote: > Dear all, > > Following is the example code I tried. I got a problem that the table is > created however the data can not insert into MySQL server. Any idea how to > fix this? > > Thank you very much! > Chloe > > import sys > impor

Re: [DB-SIG] paramstyles (mysql string length?)

2006-04-29 Thread Andy Todd
Dittmar, Daniel wrote: >> On Wed, 2006-04-19 at 08:24, M.-A. Lemburg wrote: > > But how should a module support multiple notations? > - by tokenizing any SQL statement to check which paramstyle was used > - by having an option on the connection or the cursor > - by having an additional method whic

Re: [DB-SIG] mysql string length?

2006-04-19 Thread Andy Todd
Lukasz Szybalski wrote: > On 4/18/06, Lukasz Szybalski <[EMAIL PROTECTED]> wrote: >> On 4/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >>> On Mon, 17 Apr 2006, Andy Todd wrote: >>> >>>>>>>>> stmt = "INSERT INTO

Re: [DB-SIG] mysql string length?

2006-04-17 Thread Andy Todd
[EMAIL PROTECTED] wrote: > On Sun, 16 Apr 2006, Andy Todd wrote: > >> Lukasz Szybalski wrote: >>> On Sat, 2006-04-15 at 12:01 +, Andrew Chambers wrote: >>>> * Lukasz Szybalski <[EMAIL PROTECTED]> [2006-04-14 12:00:09 -0500]: >>>> >

Re: [DB-SIG] mysql string length?

2006-04-16 Thread Andy Todd
Lukasz Szybalski wrote: > On Sat, 2006-04-15 at 12:01 +, Andrew Chambers wrote: >> * Lukasz Szybalski <[EMAIL PROTECTED]> [2006-04-14 12:00:09 -0500]: >> >>> INSERT INTO table_x( body)VALUES( '%s')" % (body) >>> >>> this body is a string that varies in size. I keep getting an error if >>> the

Re: [DB-SIG] reg File Reading

2006-02-23 Thread Andy Todd
python eager wrote: > Hi, > This is my code snippet. This code will not read the characters in Ms > Word Document. I got the below output. But if i use any *txt* format > this will be display properly. Instead of txt format i am using doc > format. I got error while reading. please help me to

Re: [DB-SIG] reg cursor.fetchall()

2006-02-15 Thread Andy Todd
Andy Todd wrote: > python eager wrote: >> Hi , This is my statment which will work fine. but the statment line is >> long. How to split up these lines . >> >> *Code Snippet :* >> >> for PID,FIRSTNAME,MIDDLENAME,LASTNAME, >> MARITALSTATUS,EMPLOYEEST

Re: [DB-SIG] reg Prepared Statment Error

2006-02-13 Thread Andy Todd
python eager wrote: > Hi, > > i am using prepared statment.While passing the value i am getting the > following error > > DatabaseError: ORA-01036: illegal variable name/number > > _Code Snippet :_ > a=cursor.prepare("DELETE FROM PERSONALDETAILS WHERE PID =?") > cursor.execute(a,(id)) > >

Re: [DB-SIG] reg cursor.fetchall()

2006-02-08 Thread Andy Todd
python eager wrote: > Hi , This is my statment which will work fine. but the statment line is > long. How to split up these lines . > > *Code Snippet :* > > for PID,FIRSTNAME,MIDDLENAME,LASTNAME, > MARITALSTATUS,EMPLOYEESTATUS,NOD,SALARY, > POI,RADDRESS,OADDRESS,MNO,LNO,DOBD,DOBM, > DOBY,DOID,

Re: [DB-SIG] How to use Prepared Statment? Facing Error

2006-02-03 Thread Andy Todd
python eager wrote: > hi, i am using the same method what you suggest. While running the > program i am getting the following error > > AttributeError: db_connection instance has no attribute 'paramstyle' > > Please rectify the error > > thank you >

Re: [DB-SIG] How to use Prepared Statment?

2006-02-03 Thread Andy Todd
python eager wrote: > Hi this my code snippet. This code will not execute. And also this code > raise error. > > DatabaseError: ORA-01036: illegal variable name/number > > What is the problem. Please give me a solution. Is there any problem is > sql statment please give the correct statment,

Re: [DB-SIG] External procedure

2005-11-11 Thread Andy Todd
Lucas Alvarez wrote: > Hi All, > I want to create a trigger that runs a python script, is that possible? > I'm using oracle 9i. > I would appreciate any help, thanks in advance. > > Lucas Alvarez > > ___ > DB-SIG maillist - DB-SIG@python.org > http:/

Re: [DB-SIG] pygresql class field auto-generation

2005-08-15 Thread Andy Todd
James Saker wrote: > Hello, > > I've been working with pygresql succesfully through a project that has a need > for classes to mirror my postgresql tables while operating (it's a customer > billing project). To this point, I've manually created classes like customer, > product, subscription all

Re: [DB-SIG] introduction for Oracle-based newbies; evangelism

2005-08-12 Thread Andy Todd
Catherine Devlin wrote: > Hi, SIG! ("Hi, Catherine!") > > I'm basically an Oracle DBA who uses Python on the side, and I'm tired > of seeing blank stares at Oracle meetings when I mention my Python > passion. So I wrote up an article designed to smooth the entry to > Python for Oracle people, ad

Re: [DB-SIG] PyGreSQL (pgdb) Problem

2005-08-08 Thread Andy Todd
Don Parris wrote: > Greetings, > > I'm running SUSE Linux 9.2, Python 2.3.4. I'm new to > Python/programming. I basically installed most of the DVD when I > installed SUSE last Fall. Things *should* be working properly, but... > > What originally started as a MySQL project is now using Postgre

Re: [DB-SIG] MySQLdb -- BLOB is array

2005-07-26 Thread Andy Todd
GMane Python wrote: > Hello all. > I'm new to python, and to Mysql, too. I'm trying stuff out, and wanted to > take a photo in a program and insert it into a MySQL table as a BLOB. When > trying to retrieve it, I get an array('c', ). > > I do a result = cursor.fetchall(), but how can I get t

Re: [DB-SIG] Strange resultset with ORDER BY col1, GROUP BY col2

2005-06-24 Thread Andy Todd
Kolbe Kegel wrote: > Hello, > > I am very new to Python, but I have encountered something that seems to > be an undocumented, possibly erroneous behavior when fetching rows from > a cursor object. I am using MySQL 5.0.7 for these tests. > > Here is a way to test: > > 1) Create a table similar

Re: [DB-SIG] Oracle API

2005-05-05 Thread Andy Todd
Gerhard Häring wrote: > Andy Todd wrote: > >>[...] The Python db-api modules (such as cx_Oracle and DCOracle2) still >>require you to have the Oracle client software installed. >> >>Oracle do ship a class (III or is it IV?) pure Java JDBC driver which >>yo

Re: [DB-SIG] Oracle API

2005-05-05 Thread Andy Todd
Stephen Day wrote: > No need the have the Oracle client. There are a few > modules that should work listed here (not all > Oracle!): > > http://www.python.org/topics/database/modules.html > > I've used cx_Oracle with success. > > Stephen Day > > > --- [EMAIL PROTECTED] wrote: > > >>Is it ne

[DB-SIG] [Fwd: Can't find MySQLdb for Python 2.4]

2005-02-09 Thread Andy Todd
Forwarding this to the list ... -- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ --- Begin Message --- I updated Python from 2.22 to 2.4 and need to update the MySQL interface, because the old one