Tim Maxey .NET Technology Blog & Resources
SQL (Miscrosoft) TSQL
I haven't had to use a direct call to a stored procedure in a long time, but came across the could not find stored procedure error. (And yes I had all security set fine). If I uncommented out the "commandType" it worked!
Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("myconnection").ConnectionString)
Dim cmd As New SqlCommand
Dim execStr As String = "EXEC dbo.InsertActivity " & userid
cmd.CommandText = execStr
'cmd.CommandType = CommandType.StoredProcedure DOES NOT WORK WITH THIS UNCOMMENTED, WEIRD
cmd.Connection = conn
conn.Open()
cmd.ExecuteNonQuery()
conn.Close()
cmd.Dispose()
Microsoft SQL Server Management Studio: An error with a message like “Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘Microsoft.VisualStudio.OLE.Interop.IServiceProvider’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{6D5140C1-7436-11CE-8034-00AA006009FA}’ failed due to the following error: No such interface supported (Exception from HRESULT: 0×80004002 (E_NOINTERFACE)). (Microsoft.VisualStudio.OLE.Interop)
My error, the first solution, download the cmd file this dude made and run as admin, reboot, geesh! It worked for me, hope it works for you and gets on Goolge, save someone some time!
http://www.davidmoore.info/2009/08/19/solution-explorer-open-each-folder-in-same-window-error-and-sql-management-studio-ie-and-team-explorer-errors/
On SQL Express I had to do the following to get FULLTEXT index setup. I also had to make sure there was a primary key, then I went to the design of the table and right clicked on the primary key (or any colum) and select the fulltext index, when the dialog came up on the right side I selected the columns I wanted to add, click close and I was set...
use mydatabase
exec sp_fulltext_database 'enable'
go
exec sp_fulltext_catalog 'tblMyTable', 'create'
go