Script(s)

technology as-is

May 16, 2006
by gchandra
0 comments

Retrieving the First N Records from a SQL Query

3 Techniques 1. Simple Fixed ‘N’ SELECT TOP 10 NewsURL, ArticleTitle, ArticleAuthor FROM NewsStoriesTable ORDER BY PublicationDate DESC 2. Dynamic ‘N’ Records CREATE PROCEDURE getRecentArticles ( @ResultCount int ) AS Declare @sSQL Set @sSQL = “Select TOP ” + @ResultCount … Continue reading

May 6, 2006
by gchandra
2 Comments

Unicode characters on Visual Studio 2003 / 2005 (UTF-8)

To display Unicode characters in .NET applications using Visual Studio, save the .aspx, .vb files or .cs files  as Unicode (UTF-8 with signature) – Codepage 65001 this signature. File > Save As  

May 1, 2006
by gchandra
0 comments

ADD/Read Hashtable Values using Asp.net (VB)

Ex: [sourcecode language=’vb’] ‘ Add values to Hashtable Dim aHash As New Hashtable aHash.Add(“id”, Trim(txtID.Text)) aHash.Add(“name”, Trim(txtName.Text)) ‘ Read Values from Hashtable Dim en As IDictionaryEnumerator en = aHash.GetEnumerator While en.MoveNext Response.write (“Key : ” & en.Key & ” / … Continue reading