Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

CLR newbie attempting JSON Serializer Expand / Collapse
Author
Message
Posted Wednesday, June 20, 2012 3:24 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Yesterday @ 9:14 AM
Points: 17, Visits: 187
Hi, I need to take a stored procedure that currently returns a simple and small record set, and change it to return JSON as an nvarchar(MAX) instead. There seem to be a good articles out there on how, but my knowledge of C# and Visual Studio is miniscule, so I'm missing some basic steps. Can someone help me bridge the gap between these two?

http://blog.sqlauthority.com/2008/10/19/sql-server-introduction-to-clr-simple-example-of-clr-stored-procedure/

and

http://www.sqlservercentral.com/articles/CLR/74160/

Or, if it's not much harder, I'd like to see if I can implement the CLR using fastJSON, as that seems to have much better performance.

http://www.codeproject.com/Articles/159450/fastJSON

I'm using SQL Server 2008 R2 and Visual Studio 2010 btw, thanks in advance!



Post #1318993
Posted Wednesday, June 20, 2012 3:31 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 12:34 AM
Points: 20,857, Visits: 32,871
Rekonn (6/20/2012)
Hi, I need to take a stored procedure that currently returns a simple and small record set, and change it to return JSON as an nvarchar(MAX) instead. There seem to be a good articles out there on how, but my knowledge of C# and Visual Studio is miniscule, so I'm missing some basic steps. Can someone help me bridge the gap between these two?

http://blog.sqlauthority.com/2008/10/19/sql-server-introduction-to-clr-simple-example-of-clr-stored-procedure/

and

http://www.sqlservercentral.com/articles/CLR/74160/

Or, if it's not much harder, I'd like to see if I can implement the CLR using fastJSON, as that seems to have much better performance.

http://www.codeproject.com/Articles/159450/fastJSON

I'm using SQL Server 2008 R2 and Visual Studio 2010 btw, thanks in advance!





To make it easier for others to get to the referenced url's:

http://blog.sqlauthority.com/2008/10/19/sql-server-introduction-to-clr-simple-example-of-clr-stored-procedure/

http://www.sqlservercentral.com/articles/CLR/74160/

http://www.codeproject.com/Articles/159450/fastJSON




Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1318998
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse