Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
morphviper
Yak Posting Veteran
60 Posts |
Posted - 2007-04-05 : 09:24:18
|
I am not sure if this is the right place to ask this or not... sorry if not!I am in the process of learning SQL Server 2005 and the books and everything talk about CLR's and how usefull they are. But when I go to try to build one, I am having an issue finding good documentation for what I want to do. I made one that updates records in a table, but what I want to do is really test the usefullness of CLR's. I want to write a file with manipulated data from the DB, or do a ton of math and stuff and return it to what ever called it. I can't seem to be able to do anything but update data in a table. I really hope that it can do more than that. I have searched MSDN and Microsoft white pages, but if anyone out there has experience or knows of any good links, I would greatly appreciate it.Thanks. |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2007-04-05 : 09:34:58
|
Do you know how to program in a .NET language like C# or VB .NET? A CLR stored procedure is simply one that is coded and runs in the .NET CLR (Common Language Runtime). So the way to learn how to program CLR stored procedures (or functions or user defined types) is to learn .NET. |
 |
|
morphviper
Yak Posting Veteran
60 Posts |
Posted - 2007-04-05 : 09:56:12
|
I know how to program in VB.Net, but I am unsure how to link it all together. Usually in VB.Net I use ADO, but from my research You don't use ADO, So there must be some way to use the data that I am unsure of. In ADO I get a Dataset, and then do what I need. In the CLR, I am unsure how to get a Dataset from the DB, Since I am not using ADO. I hope that makes sense? |
 |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-04-05 : 10:02:26
|
These links might help you:[url]http://msdn2.microsoft.com/en-us/library/ms345136.aspx[/url][url]http://www.ftponline.com/special/sqlserver/jfollas/default.aspx[/url][url]http://www.sqlservercentral.com/columnists/aAnajwala/simplesqlclrintegration.asp[/url][url]http://www.devsource.com/article2/0,1895,1791675,00.asp[/url]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2007-04-05 : 10:08:35
|
You'll need to be more specific - you can certainly use the ADO.NET classes inside CLR code, take a look at all the examples herehttp://msdn2.microsoft.com/en-us/library/ms131094.aspxThat code doesn't specifically use a DataSet because it is not necessary and I'm not sure what you want to do with a DataSet - in most cases there would be no need for one in a CLR stored procedure.In your original question you said you want to "write a file with manipulated data from the DB, or do a ton of math and stuff and return it to what ever called it" and none of that needs to use a DataSet either. |
 |
|
|
|
|
|
|