[dba-VB] C# - Direct data manipulation

Gustav Brock Gustav at cactus.dk
Fri Dec 4 08:17:12 CST 2009


Hi John

One reason could be that many web developers know little about database design, thus they are being forced to leave that to a DBA. A chief developer once told at a tech meeting I attended, that they operated with the concept "scared of the database" meaning that the web developers should just be presented with ready-made views because SQL to these was like black magic.

/gustav


>>> jwcolby at colbyconsulting.com 04-12-2009 14:54 >>>
 >I've used datatables with in-line SQL queries (to avoid designing T-SQL and special views - Shamil 
mobbed me for that choice!)

I have to say that as a developer of a higher level language, I can see where avoiding TSQL would be 
  something we would try to do.  While I understand that SQL Server can be integrated into and used 
straight from the VS environment, most of us come at it from the built-in editor which frankly 
sucks.  And I mean REALLY BADLY sucks, no apologies to our admin friends.  I guess I have been doing 
SP development for a couple of years now and I still hate the built-in editor.  And yet... that is 
what I use.

IMHO this is an area where MS has fallen down on the job.  If this integration thing is so darned 
simple, then MS should push education, seminars, books, education, education to get us working in VS 
to run (program) SQL Server.  From a development perspective, and that is what SPs and UDF are after 
all, SQL Server should just be a tool used to manipulate data, NOT a dev environment.

Over the last month I have found two APIs that allow C# to do a ton of stuff directly in SQL Server. 
  WAY COOL stuff, but you would think it was porn the way you don't see it in the mainstream.  These 
APIs allow you to manipulate SQL server the same way you can manipulate any other object - create, 
delete, observe, modify, manipulate anything in SQL Server - straight from VS.  But where are the 
forums, the blogs, the developer excitement?  It appears to me that there is a very real "here is 
your database" aimed at the developers who use SQL Server, and the admins just do things the way 
they always have for the last 20 years.  And they buy tools from the RedGates of the world who 
undoubtedly do salivate over these new APIs.

Just my humble opinion.

John W. Colby
www.ColbyConsulting.com 


Gustav Brock wrote:
> Hi John
> 
> Oh, I misunderstood you.
> Not until recently. Skipping the SQLCommand low-level stuff completely, I've used datatables with in-line SQL queries (to avoid designing T-SQL and special views - Shamil mobbed me for that choice!) and I have been busy learning just these - so one step further, no thanks. Also, I had a hard time grasping the lambda expressions and syntax and still feel I have a lot to learn. Yes, you can use LINQ without lambda, but that seems like LINQ without an arm and a leg. But - for anything else than some special cases like perhaps your cases - I'm confident LINQ is the route to follow.
> 
> /gustav






More information about the dba-VB mailing list