Posts
56
Comments
307
Trackbacks
0
SQL
Posts that relates a SQL experience
SQL 2005 Delegation of Windows Account (How to access file across network from SQL Server)
A fellow peer was looking at an error when trying to configure another developer's database. All of us are working on the same application, but our install doesn't seem to be working correctly, which causes the DB to not be properly installed, thus this guy is trying to configure it manually. We are using SQL 2005 (either Express or the regular versions) for our DB servers. He's using SQL Management Studio, logged in using Windows Authentication and was trying to bulk insert some records (BULK INSERT...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
Posted On Monday, January 12, 2009 12:17 PM | Feedback (3)
Get return value from stored procedure
Recently we changed our DAC layer from using inline SQL to stored procedures in the database. On some of these SQL, we did record deletion (usually only 1 record), and we just execute it via IDBCommand.ExecuteNonQuery() and then check the return value to see how many records were affected (which should be 1) for verification that the query actually does something. With the change to stored procedure, we just return 1 in the stored procedure if the delete is successful. However, the calling code then...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
Posted On Wednesday, September 17, 2008 11:57 AM | Feedback (28)
Returning Cursor from Stored Procedure Executing Dynamic Query
I usually stay on the C# development of things, and rarely venture to create SQL statements/code, other than the occasional SELECT / UPDATE / INSERT. However, we have a requirement from our Product Management group to DELETE records permanently from the database. We have proper enforced foreign keys in our DB schema, so one option we have is to create a stored procedure to help deletion, which will walk thru the referencing foreign keys to the record being deleted and then also delete those records...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
Posted On Tuesday, August 26, 2008 11:49 AM | Feedback (8)