From: Dave C. <dj...@ob...> - 2004-06-29 18:28:43
|
Dave Cole wrote: > Gregory Bond wrote: > >> We still have 11.5 (youch!!), 12.0 and 12.5 servers on Solaris we can >> test >> against. >> And if you ever get the bulkcopy implemented again we'd use it live! > > > Ben keeps tellng me to reimplement the bulkcopy stuff. If you are happy > to test it I should be able to do it over the weekend. Have been sick for the last two days. Getting bored at home so I had a crack at implementing bulkcopy again... Install the attached Sybase.py and try something like the following: import csv import Sybase db = Sybase.connect(server, user, passwd, database, delay_connect=1, auto_commit=1) db.set_property(Sybase.CS_BULK_LOGIN, Sybase.CS_TRUE) db.connect() blk = db.bulkcopy(table) for row in csv.reader(file("some.csv")): blk.rowxfer(row) blk.done() - Dave -- http://www.object-craft.com.au |