Viewing 15 posts - 931 through 945 (of 956 total)
Set your output to be SqlString:
[Microsoft.SqlServer.Server.SqlFunction]
public static SqlString InvokeTestService(SqlString strTestData)
{
return...
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
July 11, 2008 at 7:04 am
I am not a VB.NET guru, I do everything in C#, so I had to run this through a converter, but the following should do what you want while maintaining...
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
July 10, 2008 at 9:29 pm
This isn't something I would use CLR for. I am curious why you want to do this in CLR like this. A few things that I see is...
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
July 10, 2008 at 9:09 pm
This kind of goes back to the questions about happy hour and coworkers. I have seen the bad effects caused by getting to close to coworkers, so I personally...
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
July 8, 2008 at 7:17 am
I started out in IT on a internet helpdesk of a failing local ISP. Money was always short, so the various bills of the company were always behind. ...
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
July 8, 2008 at 7:14 am
You can do it with XML Serialization, but this is likely not the correct implementation following best practices or performance. If you can describe your problem better, we can...
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
July 7, 2008 at 10:03 pm
The answer is yes there are ways, the follow on question is why would you want to?
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
July 7, 2008 at 10:08 am
If all you are doing is selecting data, then you shouldn't be doing this in CLR. This is a TSQL only task. By using CLR for this, you are...
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
July 7, 2008 at 6:45 am
What is the error that you get, and what process are you doing when you get it? If it is a dependent items failure during a deploy operation, you...
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
July 5, 2008 at 9:01 am
You need to instatiate an instance of the Transaction Scope class. The following is an example of how you would do this:
using (TransactionScope ts = new TransactionScope())
{
using...
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
July 5, 2008 at 8:56 am
Matt is correct here. Unless you are doing complex regular expression replacements, your operation will likely be slower in CLR versus a set based TSQL implementation. I would...
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
July 3, 2008 at 10:12 am
I almost made a comment about offloading to Service Broker for exactly what RBarryYoung points out. You could hit latency issues on the linked server, but you could also...
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
July 3, 2008 at 9:11 am
This is not something that you should do with an assembly. A linked server can be created following the instructions in the BOL:
http://msdn.microsoft.com/en-us/library/ms190479.aspx
Then a DML Trigger on the server...
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
July 3, 2008 at 8:11 am
Just a note,
If I had to implement this, I would go the TSQL Route for the function over paying the cost of the CLR function in loading an AppDomain, and...
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
July 2, 2008 at 8:49 pm
You can't change how it outputs the errors, but you can change how you consume them. For example, you can create a simple function to clean it up like:
...
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
July 2, 2008 at 6:35 pm
Viewing 15 posts - 931 through 945 (of 956 total)