LINQ in a SQL CLR Stored Procedure (SQL 2008)

Hey all, i'd like to use LINQ in a CLR Stored Procedure in SQL 2008. The problem is, i can't add a reference to System.Xml.Linq. How do i make that happen? my SQL project is targeting .net 3.5, and i have SP1 installed.

I saw a blog about this somewhere recently but now i can't find it. so if you can point me to something, that would be awesome.

thanks,
-b

0
bryanc
9/10/2008 6:50:18 PM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

3 Replies
951 Views

Similar Articles

[PageSpeed] 20

I googled and found this blog http://oakleafblog.blogspot.com/2007/09/problems-using-stored-procedures-for_08.html

 


Beware of bugs in the above code; I have only proved it correct, not tried it.
(Donald Knuth)
0
Naom
9/10/2008 7:14:08 PM

That doesn't have anything to do with writing SQL CLR classes, let alone LINQ in SQL CLR.

 thanks.

0
bryanc
9/10/2008 7:20:55 PM

You're right, I should have read it more carefully. But in any case, it's interesting blog and website :)


Beware of bugs in the above code; I have only proved it correct, not tried it.
(Donald Knuth)
0
Naom
9/10/2008 7:39:17 PM
Reply:

Similar Artilces:

Linq to SQL and stored procedure with dynamic sql
I have a stored procedure like create proc test as ..... set @sql = 'select ' + .... + ' from ....' exec(@sql)The select list is dynamically (in fact, pivot table). However, after drag the stored procedure to dbml design view and called, the stored procedure only return an integer.How to get the result set of the stored procedure when using dbml?Thanks,  Is this the only SELECT statement that @sql gets?  I created a simple example and it performed as I would expect returning a complete recordset....I'm wondering if your stored proc is returning 2 record se...

Copy stored procedures from SQL to SQL DE?
Is there an easy way to copy all stored procedures from an SQL server to en SQL Desktop Engine or do I have build all stored procedures by hand?Johan TheunissenMCPD, MCSE, MCTS BizTalk 2006==============================Please mark the most helpful reply/replies as "Answer". You can use the SQL Server import/export wizard, or you can generate a script of them using SQL Server Management Studio. Thanx, In the mean time I copied them manually (copy-paste). So I think a seperate script would be usefull when you have 100+ stored procedures. Or have the script available.Johan Theu...

Sql Query String verses SQL Stored Procedure
I'm working on the performace of my pages. I want to allow large datasets and get the best performance I can. I've read that Stored Proceedures(SP) are faster than passing a Query String(QS). The questions I have are: Given the code of this page, will I see an improvement in performance using a SP? If yes, how do I allow for just SOME of the variables being passed? Users are nor required to enter all parameters. As far as I know, if you create a SP in SQL Server and don't pass ALL of the parameters it expects, you'll get an error. Also, someone mentioned that string concatinati...

SQL Query , SQL or Procedural
HIHi i need some help on what the SQL query would be, let's say i have a resultant table like this. Group TestID Result A AA 10 A BB 30 A CC 20 B AB 200 B AC 300 A DD 50 C AA 1000 and i need to query by group and re-name every field as its TestID value for that selected group:  Example:if group "A" is selected: AA BB CC DD 10 30 20 50 if group "B" is selected: AB BC 200 300 and so on.. thanks.   Here is a sample for you to play with PIVOT: SELECT [...

sql 2005 to sql 2008
dear all i created one website in visual studio 2005 and backend is sqlserver 2005. everything is working perfect. now planning to change backend sql 2005 to sql 2008. all my databses is in sql 2005. if i want to install sql 2008 then ,  is it required to uninstall sql2005 first? will all my existing coding based on sql2005  work or not  with sql 2008? kindly help me for this... regards  NO, uninstall sql2005 is not required.in my machine, both are there side by side.  Give a man a fish and you feed him for a day. Teach a man to fish and you feed...

linq to sql on sql 2000?
Does linq to sql work with sql 2000? Are there any shortcomings compared to working with 2005? Nyla Pareska:Does linq to sql work with sql 2000? Yes , Nyla Pareska:Are there any shortcomings compared to working with 2005? Maybe , but in general No .  Regards,Anas Ghanem.Note:Please Don't hesitate to click "Report Abuse" link if you noticed something wrong on the forums (like duplicate ,Off-topic,offensive,or any post that violates the website "TERMS OF USE"). -- Thanks! anas:Maybe , but in general No  Can you please be more specific? What are t...

linq-to-sql VS sql
 Is linq-to-sql as fast as sql in processing data? Or how percentage is linq-to-sql slower than sql? What is disadvantages of linq-to-sql compared with sql?Thanks for reading and replying my answer. From everything I have read about linq and comparing it to ado they relatively the same until you get into large recordsets.   http://beingmarkcohen.com/?p=168Please remember to mark the replies as answers if they help and unmark them if they provide no help.Chuck Catron There is a 5-10% hit on large record sets but its worth it for the type safe querys Steve Seeking the elegant s...

Strange difference between SQL from .Net and SQL within stored proc
Hi, I am trying to fill a DataGrid with random records from my database. It thought I had found a way to randomly select records using SQL. So I built a stored procedure in Access and sure enough, it returns a random set of records. Whe I tried to call this from my app, it kept returning the same set of records. So I copied and pasted the SQL into the app (code below) but it made no difference. Could anyone tell me why this wouldn't work? <%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %><%@ Import Namespace="System.Data" %><%@ Import Namespace="...

Stored Procedures
I am trying to create a StoredProcedure (below) that requires more than one SQL statement to be executed. I am getting a batch error as follows: Result set not permitted in '<batch statement>'. I am using ASA9 - version 9.0.1751. The following is the stored procedure that I am trying to execute. ALTER PROCEDURE "DBA"."asi_SDSelectUserDetailsRange" ( @lrange varchar(5), @hrange varchar(5), @Filter varchar(20), @ColumnName varchar(20) ) BEGIN DECLARE @SQL1 varchar(8000); DECLARE @SQL2 varchar(8000); DECLARE @SQL3 varchar(8000); D...

How to port SQL create database stored procedure to Sybase Transact-SQL
Here is the stored procedure, help would be extremely appreciated if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp__CreateDatabase]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[sp__CreateDatabase] GO CREATE PROCEDURE sp__CreateDatabase @DbName varchar(120) , @LogicalDataFileName varchar(128) = NULL , @LogicalLogFileName varchar(128) = NULL , @PhysicalDataFileLocn varchar(255) , @PhysicalLogFileLocn varchar(255) , @DataFileSize varchar(100) = 10 , @DataFileMaxSize v...

Stored procedure problem after I move from sql server to sql server 2005
Hi, Guys     I have a problem with a stored procedure. When I used sql express. there was no problem but after I change server from sql express to sql server 2005, I have an error message. The followings are source code and error message when I run program. Please help me to figure it out. This is a behind code in VB Dim tmpchkno As TextBox = FormView1.FindControl("txtchecknoin") Dim tmpchkdate As TextBox = FormView1.FindControl("txtcheckdatein") Dim sqlcon As New SqlClient.SqlConnection Dim sqlcmd...

Is it possible to process batch sql command or store procedure to update sql 2000 ?
Hello,guys:                I have a .net application with a number of datagrid controls,I used them to show &Insert &edit the data ,finally pass the datagird  data from page level  to DBL layer.                In my DBL layer I will verify the data through my bussiness rules,then pass the data to DAL layer to update the database,everything looks fine.         ...

Stored Procedures in LINQ to SQL ?
 Hi,I am using stored procedures with LINQ and I use it in such way:var result = MyDate.Procedure1.Skip(10).Take(10); In procedure there is select statement.And my question is if it sends all reslult of select or take only 10 elements of it (of course I mean how SQL server works)? I am using it in paging that is why I need to know if I have to 'remake' procedure or find another way to make my GridView faster. Hi, You aren't getting any paging on Procedure1, meaning that all of the data returned from Procedure1 is retrieved every time.  What's happening is t...

sql or my sql query
hi,in my database  i have the two tables...1)programs                                2)reservedin the programs...two fields 1)program id           2)maxseats................these details wil be entered by adminin the reserved table  two fileds ..1)PRogramid        2)statusmy requirement is .. i need the available seats..meansif any body is intersted in  any program...they wil select the program...then status becomes approved(1)..then i need the o/p as ...

Web resources about - LINQ in a SQL CLR Stored Procedure (SQL 2008) - asp.net.sql-datasource

Invasiveness of surgical procedures - Wikipedia, the free encyclopedia
There are three main categories which describe the invasiveness of surgical procedures . These are: non-invasive procedures , minimally invasive ...

Procedure is more a snap than a snip
A QUEENSLAND doctor is bidding to set an unusual world record by performing the highest number of vasectomies in one day, with the help of fellow ...

Jetstar procedures under investigation after planes took off too heavy
Jetstar's procedures for calculating the weight of its aircraft are under review by the Australian Transport Safety Bureau after two of its planes ...

Will Paul Ryan Make His Mark As Speaker By Instituting Impeachment Procedures Against President Obama ...
Wisconsin Ayn Rand devotee Paul Ryan just started his new job as Speaker of the dysfunctional House Republicans. And he's already headed for ...

NFL security procedures in question after rappelling protesters
Two protesters with sophisticated gear disrupted the Panthers-Colts game in Charlotte Monday night, bringing into question security at the stadium ...

'Painless' dental cavity procedure regrows tooth enamel
... "cavity" a lot of people sweat thinking about painful injections and relentless drilling. But scientists in Britain have developed a new procedure ...

Kim Zolciak Shares Glam Post-Heart Surgery Selfie, Calls Procedure 'a Success'
Kim Zolciak Shares Glam Post-Heart Surgery Selfie, Calls Procedure 'a Success'

Robust Growth In Procedures, Beneficial Product Mix Drive Intuitive Surgical's Strong Q3 Performance
The company’s non-GAAP gross margin improved by over 2 percentage points year-on-year due to higher average selling prices, cost savings, and ...

US AIRPORT SECURITY CONCERNS DHS to heighten procedures in light of Russian jet bombing theory, poor ...
US AIRPORT SECURITY CONCERNS DHS to heighten procedures in light of Russian jet bombing theory, poor test performances by TSA screeners

Concession: Ryan promises Freedom Caucus he’ll delay discussion of reforming procedure for removing the ...
Compromise. Like I said this morning, it sounds like they did a little horse-trading at their summit. Ryan wants them to give up their right ...

Resources last updated: 12/8/2015 12:20:33 PM