Re: Linq; expression parser?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Marc Gravell wrote:

That's IMHO a bad way of doing SOA.

Yes - I did say it was "off the cuff"... but I'm still of the opinion
that string-based runtime queries still have a role to play in
some scenarios. It shouldn't be the default, but there seems
to be enough interest to at least not preclude it.

the only reason I heard in the past years which makes some sense (not
much, but some) is that a string based query language often looks
similar to SQL.

You need a typed, compile time checked query language which,
if an error is specified, breaks at compile time so you can fix
it before you ship it to the customer ;)

In a perfect world, yes. But inevitably some things can't be known
at compile-time. It happens.

I haven't ran into these situations where you couldn't construct the
object based query at runtime and had to revert to stored strings.

Marc, you're still using EXEC sp_executeSQL "query" ? ;)

A bit OT, but if I had the need to write dynamic SQL inside the
database (not from C#), then yes: sp_executeSQL on a
parameterised nvarchar query would be the correct solution.

But equally - yes, sometimes it is necessary to build up an SQL
query manually (parameterised of course), beyond what most ORMs
will offer (e.g. a current project involves a fully-temporal database
implementation; I've not had much luck using ORM in such
scenarios - perhaps yours is better the others, I don't know).
OR-mappers (including D-LINQ) aren't the only code that can
write SQL.

Oh, that's true. However reverting to plain SQL is often a maintenance
burden, but if it's unavoidable, it happens of course. Though I'd first
look into Views and after that SQL strings created in code which should
use the o/r core. What exactly do you mean with fully temporal database?

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
.



Relevant Pages

  • Re: Update query - 1 table
    ... Data in the value field are text strings, ... Here's my select SQL: ... Nowhere in your query are you constructing a new value stripped of special ... the only criterion you need to do this is the IsNumeric function ...
    (microsoft.public.access.queries)
  • Re: strange extra quote mark appearing in mysql query
    ... At the very least you should be escaping your strings before ... query will then fail to run. ... Preventing SQL injection isn't something ... $sql = "UPDATE users SET ...
    (comp.lang.php)
  • Re: Update SQL via GUI
    ... If you still want to do this by writing an SQL statement with VBA code, ... Second - make sure if you are putting in date strings with your functions ... Instead of running the query, ... I'm 98% sure that it is because I'm calling custom functions in ...
    (microsoft.public.access.modulesdaovba)
  • Re: Problem with ADOQuery - PLS HELP ASAP
    ... Try to make your sql statements more logical when adding strings to the ... statement is still left in the query from the last button click and when you ... the first being the old update statement still there and the second ... Good practice is to ALWAYS clear the sql out of your ADOQuery before you add ...
    (borland.public.delphi.database.ado)
  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)