Home » Archive by category "SQL" (Page 2)

Archive for the 'SQL' Category

Record Update Confirmation Message

DataSource connection string <asp:sqldatasource ID=”MySQLDS” runat=”server” ConnectionString=”< %$ ConnectionStrings:MyConnString %>” UpdateCommand=”UPDATE [MyTablel] SET [DATE_SUBMITTED] = @DATE_SUBMITTED WHERE [RID] = @RID” OnUpdated=”UpdateMessage” > </asp:sqldatasource> VB code in a head section of the page <head> <script runat=”server”> Sub UpdateMessage(ByVal source As Object, ByVal e As SqlDataSourceStatusEventArgs) If e.AffectedRows > 0 Then ‘ Perform any additional processing, ‘ […]

Random db record generating script

Generate random db record output. This is classic asp script. VB.NET version is coming soon < % @ Language=”VBScript” %> < % Option Explicit %> < !DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en”> <head runat=”server”> <title> <link href=”Styles/Site.css” rel=”stylesheet” type=”text/css” /> </head> <body> <div class=”page”> <div class=”main”> <div style=”width: 900px; text-align: […]

Find missing record using query

After running the query to update table records the record(s) is missing. Run this query to find the missing record. SELECT Table1.column FROM Table1 LEFT JOIN Table2 ON Table1.column = Table2.Column WHERE Table2.column is NULL; * Replace Table1 and *2 with your table names