Ian, Thanks for the pointers. Not sure why you didn't get anything in SqlStatementListTests.zip, it came through OK when I received the message.
Here is the SqlStatementListTests.cs file again, with the tabs replaced with spaces. Let me know if there are any issues. Regards, Jay Turpin Intel Corporation "Imagination is more important than knowledge, for knowledge is limited while imagination embraces the entire world." - Albert Einstein -----Original Message----- From: Ian MacLean [mailto:ianm@;ActiveState.com] Sent: Monday, October 28, 2002 5:06 PM To: Turpin, Jay Cc: [EMAIL PROTECTED]; DeMartino, Sean R Subject: Re: [NAntC-Dev] Mod to SqlTask Jay, This is the correct form its just sometimes the committers are a bit busy and miss some of them. Keep bugging us if necessary. I'll take a look at these this week. A couple of notes: SqlStatementListTests.zip seems to be an empty archive please use nant coding guidelines http://sourceforge.net/docman/display_doc.php?docid=6080&group_id=31650 with the addition that you should use spaces instead of Tabs for formatting. Visual Studio and most editors will have an option to make this the default. This may seem like a minor thing untill you get a diff showing almost every line in the file changed because of whitespace edits. Please send diffs unstead of complete files. These are easier to examine and to integrate into the code base. Diff -u filename. Diff comes with the cygwin tools. I will review your changes and commit unless there seems to be anything glaringly wrong. I'm not running SqlServer so I won't do any real testing against it. Ian > All, > > Sean and I submitted these changes a few weeks ago, but got no > response. Is this the proper forum to submit enhancements? > > We have since updated the SqlTask and supporting classes further. In > addition to fixing some logic when executing SQL Server scripts from a > file, we have fixed a bug to that caused the task to attempt to > execute an empty SQL statement. Additionally, we incorporate the code > added by Tomas to ExpandProperties. > > The existing task caused problems when you have a script like this: > > declare @userName varchar(30) > SELECT @userName = 'sa' > EXEC sp_who @userName > GO > > declare @userName varchar(30) > SELECT @userName = 'sa' > EXEC sp_who @userName > GO > > We could only get it to execute each line as a separate batch, which > would give us errors stating that @userName was not defined, OR as a > single batch causing errors that @userName was defined more than once. > > So we enhance the logic to properly run scripts when line="true" and > batch="false". The SqlStatementList class now reads everything until > it reaches the delimiter and places everything into a single batch. > The formatting and comments from the scripts are not stripped out in > this mode. > > Tasks - primarily added code to make verbose="true" actually do > something > > <<SqlTask.ZIP>> > Utils - exposed the Connection object in SqlHelper so informational > messages and warnings could be consumed in the SqlTask class. Added > logic to SqlStatementList to handle multi-line sql scripts that must > be processed as a single batch. > > <<SqlStatementList.ZIP>> <<SqlHelper.ZIP>> > > Tests - added a couple tests for the "Line" style > > <<SqlStatementListTests.ZIP>> > > Regards, > *Jay Turpin and Sean Demartino* > >
SqlStatementListTests.ZIP
Description: SqlStatementListTests.ZIP