[ python-Bugs-1006056 ] odbc queries with very long strings fail with no exceptions

SourceForge.net noreply at sourceforge.net
Tue Aug 10 09:34:23 CEST 2004


Bugs item #1006056, was opened at 2004-08-09 18:17
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1006056&group_id=5470

Category: Windows
Group: Python 2.3
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: leve (leve)
Assigned to: Nobody/Anonymous (nobody)
Summary: odbc queries with very long strings fail with no exceptions

Initial Comment:
#W2K MSSQL 2000

#CREATE TABLE [dbo].[Table1] (
#    [Id] [int] NULL ,
#    [Data] [int] NULL 
#)
 
import dbi, odbc
import time

myconn = odbc.odbc('DSN=ctbase2; UID=sa; PWD=')
mycursor = myconn.cursor()

updatelst = []
start = time.time()

for i in range(10000):
    updatelst.append("update table1 set id = %d, data = 
%d " % (i, i))
stri = " ".join(updatelst)
rc = mycursor.execute(stri)
myconn.commit()   
#time.sleep(100)
mycursor.close()
myconn.close()

# When running this script, a very long string is passed 
to execute.
# Only a few first update commands are executed. 
# (I checked it by reading the data back). 
# Somehow this is timing dependant. 
# If sleep is commented out - 480 commands are 
executed.
# If sleep is for 10 sec. - 1600 - 1800 commands are 
executed.
# If sleep is for 100 sec. - 3800 commands are executed.
# In all cases no exception is thrown and rc = 1

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2004-08-10 09:34

Message:
Logged In: YES 
user_id=21627

Python does not provide an odbc module. Please report the
bug to the author of the odbc module you are using.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1006056&group_id=5470


More information about the Python-bugs-list mailing list