Title: Message

I think that’s what I did, except used “sqltype” instead of “provider.”  I like “provider” better, I guess.  Maybe whoever commits it (if that’s what ends up happening) can change it at that time.  Here’s what I did:

 

Before I started there was SqlTask.cs and SqlHelper.cs, both of which were wired to the OleDb provider.  I took the provider-specific code out of SqlTask.cs and SqlHelper.cs.  SqlHelper became an abstract class.  Then the OleDb stuff when into OleDbSqlHelper (it’s about eight lines of code) and MySqlSqlHelper.  Finally, a SqlHelperFactory returns the version of SqlHelper indicated by the “sqltype” property.

 

Is this what you were thinking, Jay?

 

 - Jason

 

-----Original Message-----
From: Turpin, Jay [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 6:09 PM
To: [EMAIL PROTECTED]
Subject: RE: [NAntC-Dev] Sql task patch for mysql

 

It's been awhile since I used MySql, but can't this logic be accomplished with adding a new property to the task. Perhaps by using the Provider= tag in the connstring property and performing the proper logic internally?

 

Regards,
Jay Turpin
"The greatest motivational act one person can do for another is to listen." - Roy E. Moody

-----Original Message-----
From: Jason Pettys [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 11:38 AM
To: [EMAIL PROTECTED]
Subject: [NAntC-Dev] Sql task patch for mysql

I’ve done a little refactoring of the SqlTask, mainly in the SqlHelper class, to ease the addition of new connection types.  I did this in order to use MySQLConnection to connect to a MySql database with the SqlTask.  To get the connection I used the bytefx MySql classes at http://sourceforge.net/projects/mysqlnet.

 

Here’s my task:

            <sql     

connstring="Data Source=ipadev2;Database=mysql;User ID=root;Password=root;COMMAND LOGGING=false"

                        sqltype="MySql"

                        transaction="false"

                        delimiter=";"

                        delimstyle="Line"

                        output="results.txt"

            >

                        select * from user

            </sql>

 

Can this be added to CVS?  Here’s a summary of my changes:

 

-          Changed and added .cs files.

-          Included ByteFX.Data.dll with the source.

-          Update NAntContrib.build to reference ByteFX.Data.dll.

 

Are the any licensing issues that need to be addressed?

 

Included is a zip including the new files and a .patch for the changed file.

 

If I messed anything up or need to do anything else let me know.

 

Thanks!

 

Jason Pettys

 

Workforce ROI Corp.

Fargo, ND

Reply via email to