IT Readings Log   

Saturday, March 04, 2006

Accessing and Updating Data in ASP.NET 2.0: Filtering Database Data with Parameters

Hints over the VS.NET 2005.

I've been reading this article and all I had in my head was: "How come this .NET code starts to look more and more like ColdFusion code that I've been using 6 years ago?"

Really. ColdFusion guys, don't you think that several .NET 2005 features were available fo a loong time in ColdFusion, especially this one, in the article below?

.NET:
<asp:SqlDataSource ID="ID" runat="server" ConnectionString="connectionString"
ProviderName="providerName"
SelectCommand="parameterizedQuery">

<SelectParameters>
<asp:Parameter DefaultValue="hardCodedValue"
Name="parameterName"
Type="dataType" />
</SelectParameters>

</asp:SqlDataSource>

ColdFusion:
<cfquery name="getFirst" datasource="cfsnippets">
SELECT * FROM courses WHERE Course_ID=

<cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#Course_ID#">

</cfquery>

http://aspnet.4guysfromrolla.com/articles/030106-1.aspx

0 Comments:

Post a Comment

<< Home