[RESOLVED] Threw an exception of type 'Microsoft.VisualStudio.Debugger.Runtime.CrossThreadMessagingException'

by pietman 19. December 2011 14:40

threw an exception of type 'Microsoft.VisualStudio.Debugger.Runtime.CrossThreadMessagingException'

 

solution:

textBox1.Invoke(       new MethodInvoker(           delegate { textBox1.AppendText("."); }));

Tags:

Errors

SQL Server 2008 - Rule "Previous release of Microsoft Visual Studio 2008" failed

by pietman 15. September 2011 10:35

Although you already have VS2008 SP1 installed.

Fix:

start -> run -> "cmd"

Setup /ACTION=install /SkipRules=VSShellInstalledRule

you will still get an error but it installs fine.

 

The SQL Server 2008 installer is checking the HKLM\SOFTWARE\Microsoft\DevDiv\XXX\Servicing\9.0\SP reg keys to tell if SP1 is installed. If you inspect those keys and find any SP keys with the value “0,” that is your road block.

 

Tags:

Errors | SQL SERVER

Throwing Errors in SQL stored procedures

by pietman 13. September 2011 12:41

Best way to do it is as follows:

create function dbo.throwError()
returns nvarchar(max)
as
begin
    return cast('Error here.' as int);
end

and it will throw the following error:

Msg 245, Level 16, State 1, Line 1
Conversion failed when converting the varchar value 'Error here.' to data type int.

Tags:

Errors | SQL SERVER

About ...

pietman celliersPietman Celliers
Bitlink  Ltd
bitlinkit.com