On Oct 20, 3:38 pm, Tim Golden <[EMAIL PROTECTED]> wrote:
> Eric Wertman wrote:
> >> I am trying to use pymssql, and have an issue where by the execute
> >> (not the fetch) is appearing to load all records into memory.
>
> >> if I execute
>
> >> con = pymssql.connect(...)
> >> cur = con.cursor()
>
Hi
I am trying to use pymssql, and have an issue where by the execute
(not the fetch) is appearing to load all records into memory.
if I execute
con = pymssql.connect(...)
cur = con.cursor()
cur.execute(sql)
rec = cur.fetchone()
if I put in a query which returns a lot of records into "sql" the
Hi
Thanks for the reply.
I will send it in when I am done :-)
Simon Forman wrote:
> ChaosKCW wrote:
> > Hi
> >
> > Has anyone caputerd the output from the std ftp lib? It seems a bit
> > annoying that everything is printed to stdout. It means incorporating
> >
Hi
Has anyone caputerd the output from the std ftp lib? It seems a bit
annoying that everything is printed to stdout. It means incorporating
this into any real program is a problem. It would have been much better
if they used the std logging module and hooked up a console logger for
the feault ftp
>
> When python tries to concatenate a byte string and a unicode string, it
> assumes that the byte string is encoded ascii and tries to convert from
> encoded ascii to unicode. It calls ascii decoder to do the decoding. If
> decoding fails you see message from ascii decoder about the error.
>
>
>
> There's an Oracle environment variable that appears to make a
> difference: NLS_CHARSET, perhaps - it's been a while since I've had to
> deal with Oracle, and I'm not looking for another adventure into
> Oracle's hideous documentation to find out.
>
That is an EVIL setting which should not be
Roger Binns wrote:
>
> No. APSW converts it *to* Unicode. SQLite only accepts Unicode
> so a Unicode string has to be supplied. If you supply a non-Unicode
> string then conversion has to happen. APSW asks Python to
> supply the string in Unicode. If Python can't do that (eg
> it doesn't kno
Hi
Thanks for all the posts. I am still digesting it all but here are my
initial comments.
>Don't. You can't. Those characters don't exist in the ASCII character set.
>SQLite 3.0 deals with UTF-8 encoded SQL statements, though.
>http://www.sqlite.org/version3.html
As mentioned by the next poster
Hi
I am reading from an oracle database using cx_Oracle. I am writing to a
SQLite database using apsw.
The oracle database is returning utf-8 characters for euopean item
names, ie special charcaters from an ASCII perspective.
I get the following error:
>SQLiteCur.execute(sql, row)
>UnicodeDe
Hi
Is it possible to grab get an object returned from a string and a
callable ? e.g
I pass in a key value pair:
def somemethod(adict = {'new name for object': ''}):
object = .
for key, value in adict.items():
if callable(value):
somedict[key] = value()
else:
So timeit is mostly useless then ?
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I was wondering if someone could help with the import statements needed
to use the timeit module in the following code. I need to access the
"cur" object.
Thanks,
import cx_Oracle
import timeit
def VerifyTagIntegrity(con, TableOwner):
cur = con.cursor()
sql = 'select (select count(*)
For those that are interested I ran a performance comparison of various
functions for wrapping sql results in a interables and generators. The
results are below and the code is at the very bottom.
Surprisinly (in a happy way) the functional version of the batch
retrieve comes in a very close secon
Hi
Thanks this was very helpfull.
Your final solution seems like the best (most elegant). I was trying to
avoid the ugly while loops with breaks and this final one certainly
does that.
Thanks for your help .
--
http://mail.python.org/mailman/listinfo/python-list
Hi
Using Python 2.4 I am trying to procduce a generator which will return
the results of dbi SQL statement using fetchmany for performance.
So instead of fetching one record for each call, I will fetch batches
of X (eg 100) and yeild each record in turn.
For reasons of pure asthetics and my own
15 matches
Mail list logo