Re: [Tutor] Tutor Digest, Vol 39, Issue 60

2007-05-23 Thread Leon Keylin
Janos, I tried the ODBC way and it worked! I was about to give up and do it in C# or some other language but I love Python so much I wanted it to work. Thank you SO MUCH! And thanks to all of you who helped as well! You folks are the best. Message: 6 Date: Wed, 23 May 2007 08:07:35 +0200 Fro

Re: [Tutor] Tutor Digest, Vol 39, Issue 57

2007-05-22 Thread Leon Keylin
bConsolidatedMessageAcks" cur.execute(query) print "Deleted Records: %d" % cur.rowcount On Monday 21 May 2007 16:21, Leon Keylin wrote: Thanks Mike, unfortunately that's the mod I had problems with before. The one that can't do truncate. I've written about it bef

Re: [Tutor] MS SQL Connection

2007-05-21 Thread Leon Keylin
riginal Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Leon Keylin Sent: Monday, May 21, 2007 3:52 PM To: tutor@python.org Subject: [Tutor] MS SQL Connection Been trying to do a very small and simple select via Python. First I tried a module that looked clean but it couldn&#x

[Tutor] MS SQL Connection

2007-05-21 Thread Leon Keylin
Been trying to do a very small and simple select via Python. First I tried a module that looked clean but it couldn't truncate tables. Then I started sifting through docs at python.org and couldn't find a simple way of communicating with a MS SQL via Python program. Do I have to use ODBC? Any e

Re: [Tutor] Truncating a Table

2007-05-11 Thread Leon Keylin
on the dbserver used, but PostgreSQL for example requires commits for everything (including statements like CREATE TABLE). Andreas -- Ursprüngl. Mitteil. -- Betreff:Re: [Tutor] Truncating a Table Von: "Leon Keylin" <[EMAIL PROTECTED]> Datum: 11.05.2007 16:01 Yep, wor

Re: [Tutor] Truncating a Table

2007-05-11 Thread Leon Keylin
Yep, works if I do it manually, under the same user. On 5/11/07, Tim Golden <[EMAIL PROTECTED]> wrote: Leon Keylin wrote: > Thanks Tim for a fast reply. > > The return gives me 0 Rows Truncated message and when I look at the table, > every record is still there. > There a

Re: [Tutor] Truncating a Table

2007-05-11 Thread Leon Keylin
5/11/07, Tim Golden <[EMAIL PROTECTED]> wrote: Leon Keylin wrote: > Why would this not work? > > import pymssql > > con = pymssql.connect(host='server > name',user='username',password='pwd',database='Database') > cur = con.cur

[Tutor] Truncating a Table

2007-05-11 Thread Leon Keylin
Why would this not work? import pymssql con = pymssql.connect(host='server name',user='username',password='pwd',database='Database') cur = con.cursor() query="TRUNCATE TABLE Consolidatedmsgs;" cur.execute(query) print "Table Truncated: %d rows deleted" % cur.rowcount --- The return I g