Then compile your app and test.Note that when I use SPSite (or if I were using SPWeb) I do it within using. This ensures that the SPSite resource is properly disposed. You could instead manually call mySite.Dispose(); I like to instantiate SPSite and SPWeb inside using wherever possible to ensure proper cleanup.It is also worth noting that whenever you do any specific operation that would actually require accessing SQL--you should be in a try block.Declaring the new site object itself doesn't require SQL access, but accessing any information off of it or doing an operation would.