Linq to SQL. sproc or dynamic sql?

Im of the old school belif that all data should come from a DB via sprocs for many reasons that i wont go into here.

Im getting into website creation and want to call data from my db via linq to sql. I will want to have some form of pagination. is this easily possible using sprocs( without modifying the sprocs) or are you better just use dynamic sql and skip and take keywords?

0
fintag
10/8/2008 5:00:50 PM
asp.net.getting-started 91979 articles. 3 followers. Follow

2 Replies
757 Views

Similar Articles

[PageSpeed] 47

Hi,

Please refer to the following link below for the information about "LINQ to SQL (Retrieving Data Using Stored Procedures)"

http://weblogs.asp.net/scottgu/archive/2007/08/16/linq-to-sql-part-6-retrieving-data-using-stored-procedures.aspx

 

 

Please feel free to let me know if I’ve misunderstood anything.


Sincerely,
Zong-Qing Li
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
Answer” if a marked post does not actually answer your question.
0
Zong
10/10/2008 3:56:24 AM

The following links surely help you

http://www.code-magazine.com/article.aspx?quickid=0603021&page=2
http://windowsclient.net/learn/videos_LINQ.aspx
http://windowsclient.net/learn/videos_LINQ.aspx
http://www.codeproject.com/KB/dotnet/UnderstandingLINQ.aspx#Introductionhttp://davidhayden.com/blog/dave/archive/2007/08/07/CreatingDataAccessLayerLINQToSQLStoredProceduresSupport.aspx
http://www.hookedonlinq.com/(X(1)S(1xws2s551qxeduvow4tbbe45))/LINQOverview.ashx
http://www.codeproject.com/KB/architecture/EnterpriseApplicationArch.aspx
http://www.codeproject.com/KB/recipes/linq_to_sql3.aspx
http://linqinaction.net/blogs/main/default.aspx
http://www.devconnections.com/updates/LasVegas_07/ASP_Connections/Lerman_ASP_LINQDataBinding_FINAL.pdf
http://www.pdf-search-engine.com/linq-in-action-pdf.html
http://www.mikeborozdin.com/?tag=/linq

 

Please 'mark as answer' if you solved your problem.... 

0
sreenatht
10/10/2008 4:34:07 AM
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...

dynamic linq to sql or use sprocs?
I've been trying to figure this out.  I have complex queries that return the data for a listview control.  I've looked into dynamic linq to sql, but I haven't been able to find any information that I could understand.  Is there a clear, step by step explanation anywhere?Another option is to use a stored procedure.  I have one, but I'm having a hard time getting it to work.  This is what I have (GetProfileSearch is a sproc):Dim db As New ProfilesDataContextDim m = db.GetProfileSearch(upperage.Text, lowerage.Text, Sex.Text, Location.Text, race.Text, Rel...

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...

Dynamic SQL in Transact SQL
Does Dynamic SQL can be done in transact sql format in stored procedure? If yes, any reference can be read? Thx..... ...

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...

SQL Injection and Dynamic SQL
The consensus on avoiding SQL injection attacks is to pass all your collected data to a stored procedure. If you have to return a result set from a complex form, the answer seems to be to use dynamic SQL. On further study, I discovered that dynamic SQL has a lot of potential pitfalls and low and behold can still be vulnerable to injection attacks. I know that I am not the first person to ever try and collect data from a web form and return a result set, so what are the best practices? Say I have a complex form with about 25 search criteria (most of which are optional), I go through all t...

Dynamic SQL in Sybase SQL
Im trying to create a bit of Dynamic SQL in a Sybase stored procedure, im used to MS SQL Server so im not sure what im doing wrong in Sybase. Heres my bit of code declare @sql varchar(100) declare @sql2 varchar(100) Select @sql = '''0001/100212'',''0001/100218'',''0001/100240'','0001/100243''' select @sql2 = 'select * from table where table_tra_code in (' + @sql + ')' Exec @sql2 now i would have thought this would have executed @sql2 and returned a result set, but no :(. Any ideas?, id...

Noobie Help
Hi,I'm tyring to build a very simple code sample that does a DB Insert.Here is a code sample I found: HookedOnLINQ db = new HookedOnLINQ("Data Source=(local);Initial Catalog=HookedOnLINQ"); // Adding Records – (1) Create a new object and sub-objects, // (2) Add it to the DataContext collection, (3) Call SubmitChanges // (1) Contacts newContact = new Contacts(); newContact.FirstName = "Troy"; newContact.LastName = "Magennis"; // (2) newContact.Orders.Add(newOrder); db.Contacts.Add(newContact); // (3) db.SubmitChan...

Free .Net and Sql Server Training Videos for Developers just getting started
I figured since this is the Getting started forum I would mention a great .Net training video site with some free videos.http://www.TechnicalVideos.netThanksMike James...

Dynamic SQL in Sybase SQL Server
Hey all, Im trying to create a bit of Dynamic SQL in a Sybase stored procedure, im used to MS SQL Server so im not sure what im doing wrong in Sybase. Heres my bit of code declare @sql varchar(100) declare @sql2 varchar(100) Select @sql = """0001/100212"",""0001/100218"",""0001/100240"",""0001/100243""" select @sql2 = 'select * from tablename where table_code in (' + @sql + ')' Exec @sql2 now i would have thought this would have executed @sql2 and returned a res...

SQL function using dynamic sql.
 Hi all I am trying to pass a column name as a variable in a function but it will not let me.  I am sure it is something stupid. I know that you cannot pass a column in a normal select statement as a variable. You have to execute it dynamically, however you cannot use the exec in a function. Please see code belowALTER FUNCTION dbo.GetData(@ColumnName varchar(50))RETURNS Decimal(18,4)ASBEGINDECLARE @Value Decimal(18,4)SET @Value = (SELECT + @ColumnName + FROM Policy   WHERE Grade = 'Revised') -- Tried this way, does not work need to use ExecSET @Value = Exec(&...

LINQ to SQL & Sql Anywhere
A customer is trying to develop unsuccessfully a .NET application with Web Developer Express 2008 using LINQ TO technology which I suppose not to be supported by the db provider for Sql Anywhere 10. Could you please confirm and suggest similar and alternative technology. Thanks Diego Perego wrote: > A customer is trying to develop unsuccessfully a .NET application with Web > Developer Express 2008 using LINQ TO technology which I suppose not to be > supported by the db provider for Sql Anywhere 10. > Could you please confirm and suggest similar and alternative t...

Is Dynamic SQL Possible in T/SQL
I come from a Microsoft SQL Server environment, so I am used to being able to create dynamic SQL statements within a stored procedure with the EXEC command. It appears that Sybase's equivalent command only recognizes othere stored procedures. Does anyone know of a way to do this in Sybase? ASE 12.0 supports dynamic execution of strings, see "execute" in Ref Manual. In versions ASE 11.5 and higher, you can also use the sp_remotesql against the "local" server, for much the same effect, although there are more limits using this than the "execute imm...

LINQ TO SQL & Sql Anywhere
A customer is trying to develop unsuccessfully a .NET application with Web Developer Express 2008 using LINQ TO technology which I suppose not to be supported by the db provider for Sql Anywhere 10. Could you please confirm and suggest similar and alternative technology. Thanks "Diego Perego" <dperego@sybase.com> wrote in news:4784f6f9$1@forums-1-dub of sybase.public.sqlanywhere.product_futures_discussion: DP> A customer is trying to develop unsuccessfully a .NET application with DP> Web Developer Express 2008 using LINQ TO technology which I suppose DP...

Web resources about - Linq to SQL. sproc or dynamic sql? - asp.net.getting-started

Dynamics - Wikipedia, the free encyclopedia
Brownian dynamics , the occurrence of Langevin dynamics in the motion of particles in solution (e.g. a grain in water, as was first seen by Brown); ...

Datacenter Dynamics
Datacenterdynamics for data center information, conferences, news, videos, whitepapers and reports globally

Dynamic Chiropractic - chiropractic, news, articles, research & information for chiropractors - Find ...
Dynamic Chiropractic - chiropractic, news, articles, research & information for chiropractors - Find a Chiropractor

Walmart's Everyday Low Prices Face Amazon's Dynamic Price Push
... low prices" strategy is becoming an everyday price-adjustment strategy. In what seems to be a direct response to Amazon's sophisticated dynamic ...

Master & Dynamic MW60 wireless headphones offer style and performance
Priced at £419 (€579/$549), there's no denying that Master & Dynamic's wireless MW60 headphones are expensive—but boy do they look it. Cast out ...

General Dynamics Corporation Delivers The Future of American Shipping
American Petroleum Tankers receives delivery of first ECO class tanker from General Dynamics\' NASSCO.

Mea Culpa: Confidence Proceedings Edition: I Really Do Think Dynamic Scoring Is a Bad Idea
... *Brad DeLong noted that when he was a Treasury political appointee, one of the Treasury career staff economists lectured me him about dynamic ...

Yolanda Foster explains her divorce: ‘chronic illness changed our dynamic’
... is extremely challenging, not only for the person that’s sick, but also for the caregiver,” Foster admitted. “It for sure changed the dynamic ...

Ford's 'Dynamic Shuttle' tests out a competitor for Uber
... group transportation options, its next competition could come from Ford. Today at an event in Dearborn, the carmaker showed off the Dynamic ...

Yolanda Foster Says Lyme Disease 'Changed the Dynamic' of Her Marriage to David Foster
Yolanda Foster Says Lyme Disease 'Changed the Dynamic' of Her Marriage to David Foster

Resources last updated: 12/15/2015 6:48:30 PM