Yes i got it to work now. Thank you for all help Tim and Steve. I hope
it will work for Oracle to :)
Regards Joel
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED]
| i gott the same results with both executemany and execute. i will try
| with some other sql modules. if you try tim so let me now if
| you cot it
| to work.
OK, the relevant thing here is the paramstyle. When I made that
misguided claim earlier that "?" was the most common pa
i gott the same results with both executemany and execute. i will try
with some other sql modules. if you try tim so let me now if you cot it
to work.
many thanks for your help.
regards joel
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED]
| Traceback (most recent call last):
| File "txttosql6.py", line 23, in ?
| row
| File "C:\Python24\Lib\site-packages\pymssql.py", line 120, in execute
| self.executemany(operation, (params,))
| File "C:\Python24\Lib\site-packages\pymssql.py", line 146, in
| executemany
|
Ok thanks Tim. I'm possible to read the file now as you described but
when I pass it to the DB I got an error says:
[['1', 'Joel', 'Sjoo'], ['2', 'Sture', 'Andersson'], ['3', 'Arne',
'Svensson']]
Traceback (most recent call last):
File "txttosql6.py", line 23, in ?
row
File "C:\Python24\Lib\si
[EMAIL PROTECTED]
| I'm a dba for SQL server and I Will import a textfile to SQL. For
| example I use a file with 3 columns. ID, Name and Surname and the
| columns are tab separated. I don't know much about programming.
| Anyway, I use this code below. It works, but it will not split the
| columns
i know the bulk instert functions i ms sql but i will use this script
for oracle in a linux enviroment to so i think python is a good choice.
regard joel
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I'm a dba for SQL server and I Will import a textfile to SQL. For
> example I use a file with 3 columns. ID, Name and Surname and the
> columns are tab separated. I don't know much about programming.
> Anyway, I use this code below. It works, but it will not split the
> c
[EMAIL PROTECTED]
| I'm a dba for SQL server and I Will import a textfile to SQL.
Not a Python answer, but unless you're in it for the
learning experience, I *seriously* suggest you look
at the built-in BULK INSERT command to see if it
meets your needs.
Random URL:
http://www.sqlteam.com/item.
I'm a dba for SQL server and I Will import a textfile to SQL. For
example I use a file with 3 columns. ID, Name and Surname and the
columns are tab separated. I don't know much about programming.
Anyway, I use this code below. It works, but it will not split the
columns. I have tried to change the
10 matches
Mail list logo