ASP.NET CODE FOR DATABASE

ASP.NET CODE FOR DATABASE

<asp:SqlDataSource ID=”SqlDataSource1″ runat=”server” ConnectionString=”<%$ ConnectionStrings:ConnectionString2 %>”

ProviderName=”<%$ ConnectionStrings:ConnectionString2.ProviderName %>”

SelectCommand=”SELECT * FROM [employee]”

UpdateCommand=”UPDATE [employee] SET [fname] = ?, [lname] = ?, [department] = ?, [designation] = ?, [address] = ?, [city] = ?, [phone] = ? WHERE [emp_id] = ?”

DeleteCommand=”DELETE FROM [employee] WHERE [emp_id] = ?”

InsertCommand=”INSERT INTO [employee] ([emp_id], [fname], [lname], [department], [designation], [address], [city], [phone]) VALUES (?, ?, ?, ?, ?, ?, ?, ?)”>

<UpdateParameters>

<asp:Parameter Name=”fname” Type=”String” />

<asp:Parameter Name=”lname” Type=”String” />

<asp:Parameter Name=”department” Type=”String” />

<asp:Parameter Name=”designation” Type=”String” />

<asp:Parameter Name=”address” Type=”String” />

<asp:Parameter Name=”city” Type=”String” />

<asp:Parameter Name=”phone” Type=”String” />

<asp:Parameter Name=”emp_id” Type=”String” />

</UpdateParameters>

<DeleteParameters>

<asp:Parameter Name=”emp_id” Type=”String” />

</DeleteParameters>

<InsertParameters>

<asp:Parameter Name=”emp_id” Type=”String” />

<asp:Parameter Name=”fname” Type=”String” />

<asp:Parameter Name=”lname” Type=”String” />

<asp:Parameter Name=”department” Type=”String” />

<asp:Parameter Name=”designation” Type=”String” />

<asp:Parameter Name=”address” Type=”String” />

<asp:Parameter Name=”city” Type=”String” />

<asp:Parameter Name=”phone” Type=”String” />

</InsertParameters>

</asp:SqlDataSource>

 

* ASP.NET CODE FOR DATABASE

R K Gupta

Hi, This is R K Gupta, an IT professional and Entrepreneur. I have written many articles yet for my websites gsesoftsolutions.com, Hope you like it. Kindly subscribe our feed for any updates. Add me in Facebook and Google+

More Posts - Website

Follow Me:
TwitterFacebookPinterestYouTube

Hi, This is R K Gupta, an IT professional and Entrepreneur. I have written many articles yet for my websites gsesoftsolutions.com, Hope you like it. Kindly subscribe our feed for any updates. Add me in Facebook and Google+

Posted in Database Management, Software Development