This project is read-only.
Project Description
Add-In for Visual Studio 2005-2008 for quickly paste of sql sentences. It can generate automatic wrapper code like string conversión and also is able to extract sql params and convert it in SqlParameter only read the sql query from clipboard.



After instalation, you will have a new icon in your "tool" menu with a yellow smile face. If you want to use them follow next steps.

1) Copy in the clipboard a sql sentence from your favourite application like Sql Management or Access
2) Execute SqlFasterPaste in VS 2005 or VS 2008 pressing yellow face.
3) Push enter.

And instead of copy the sql as it, you will have a C# code with every sql constanst transformed in params.


You can edit your codetemplate.xml for make that SqlFasterPaste write your Own Code.

The diferents templates are agrupate in xmlnode named "templates". If you want to add your own template, put another region like that:

<codeTemplate name="default">
<CodeStart>#region sqlquery /$oldsql/ string query=@"$newsql";</CodeStart>
<SqlParameterStart>SqlParameterCollection colection = new SqlParameterCollection();</SqlParameterStart>
<SqlParameter>colection.Add(new SqlParameter( $name, $value ));</SqlParameter>
<SqlParameterEnd />

-The atribute name of the codeTEmplate is the name that this template is going to appear in preview windows.
-CodeStart is the section of the beginning in the code.
-SqlParameterSTart is the seccion after CodeStart an before the paramenters.
$aldsql, $newsql, $name, $value are variables that they will be replaced by corrects values.

Last edited Jun 2, 2008 at 12:38 PM by cpsaez, version 5