Tag Info

New answers tagged

4

When I try to drop a person that recently had a connection with SQL Server Why are you doing this? What drove the need to have to do this? It sounds like you're running into connection pooling. But connection pooling is there to help you, it's a great optimization. By clearing the pool you're wiping out this caching mechanism. My recommendation, ...


0

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using MySql.Data.MySqlClient; namespace DBsync2 { //table2 is the Master(with duplicates) Table and table1 is the one without duplicates <pre> public partial ...


6

You cannot redeclare variables, nor can you test to see if they have been declared (at least not that I have ever been able to find). BUT, you shouldn't need to do this anyway. If you know the variable names ahead of time, just declare them all at the beginning of the process. Then, use them throughout the script. For example: ...


0

From reading your question I think you are building the SQL code in your application and then sending it to the server as one long script with multiple statements. If this is the case you can separate your statements with GO to create batches. The following is valid SQL: DECLARE @a INT; SET @a = 1; SELECT @a; GO DECLARE @a INT; SET @a = 1; SELECT @a; ...



Top 50 recent answers are included