20 July 2007

Debug sproc [MSSQL stored procedures] in VS

( Source: http://aspalliance.com/1131_Understanding_Object_Pooling_in_Microsoft_NET )

In VS at the Sever Explorer pane I right-click on my data connection that I added and select Modify Connection. Then in the Modify Connection dialog I clicked Advanced... and then in the Advanced Properties dialog I changed Pooling from True to False. Now it works. Also, in the configuration file, the Enable SQL Server debugging must be checked. Also, I have to add cmd.CommandTimeout=1800 to the VB's sproc area else it will time-out while clicking thru the sproc in the debugger.

But, when not debugging, in order to get the app to run to completion without crashing with the error Error while executing 'a batch cmd' at line 0 , I have to uncheck Enable SQL Server debugging and set Pooling back to True. --Because not pooling the connections hurts performance.

(Summary: You do the above to VS so that you can step through,and see, the database while debugging the code of an app in VS.)

18 July 2007

To export DTS package, do the following:

  1. Open MS SQL Server Enterprise Manager
  2. Go to Local Packages
  3. Open some DTS Package
  4. In the DTS Package window from menu select item Package->Save As...
  5. In the Save DTS Package dialog
    • in the Location field select Structured Storage File
    • in the File Name field set destination path of saved file
  6. Press OK button

header adsense code