Home » Archive by category "MS SQL" (Page 4)

Archive for the 'MS SQL' Category

VB.NET – Parameters

Parameter default value in code behind SQL Datasource <asp:sqldatasource ID=”ServiceExpired” runat=”server” ConnectionString=”< %$ ConnectionStrings:intranetConnectionString2 %>” SelectCommand=”SELECT * FROM [Invoice] _ WHERE _ ([EXPIRATION_DATE] >= @EXP_BEG) _ AND _ ([EXPIRATION_DATE] < @EXP_END) _ AND ([EXPIRATION_CONTACT] = @EXPIRATION_CONTACT) _ ORDER BY _ EXPIRATION_DATE "> <selectparameters> <asp:parameter DefaultValue=”YES” Name=”EXPIRATION_CONTACT” Type=”String” /> <asp:parameter Name=”EXP_BEG” Type=”DateTime”/> <asp:parameter Name=”EXP_END” Type=”DateTime”/> </selectparameters> […]

Select Count * (count total of records)

VB.NET Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then Try ‘/ access db connection – MS Access 2007/10 ‘ driver * you can define your own sql connection Dim ConnDB As New OleDbConnection(“Provider=Microsoft.ACE.OLEDB.12.0; Data Source=” & Server.MapPath(“my_db.accdb”)) ‘/ open connection ConnDB.Open() Dim cmd As New OleDbCommand(“select count(*) from table1 […]

jQuery Autocomplete ASP.NET

Simple and easy to setup “autocomplete” code for a search textbox in your ASP.NET application. What do you need: 1. Generic handler (Search_VB.ashx) – Download it from here as a text file and convert it to ashx. 2. Stylesheet (jquery.autocomplete.css) – Download it from here as a text file and convert it to css. 3. […]