Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ''' <summary>
- ''' TEST USE ONLY. Updates the pass in query by replacing the variables with their respective values from the parameter collection. Query is then outputed to the Immiediate window
- ''' </summary>
- ''' <param name="Sql"></param>
- ''' <param name="Params"></param>
- ''' <Created>'19.04.00 RI:xxxx CARRP02 02/21/2012</Created>
- ''' <History></History>
- ''' <remarks>use this for queries that have the variables parameterized</remarks>
- Public Sub OutputSqlToConsole(Sql As String, Params As SqlClient.SqlParameterCollection)
- Try
- For Each SqlParam As SqlClient.SqlParameter In Params
- Sql = Sql.Replace(SqlParam.ParameterName, SqlParam.Value)
- Next
- Console.WriteLine(Sql)
- Catch ex As Exception
- 'this method is only used for debuging so it should not crash the app if used inappropriately
- End Try
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment