<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Kinh nghiệm lập trình</title>
    <link>http://www.huyphong.com/</link>
    <description>nguyễn trần huy phong</description>
    <language>en-us</language>
    <copyright>huyphong.com</copyright>
    <lastBuildDate>4/17/2026 8:43:30 AM</lastBuildDate>
    <ttl>20</ttl>
         <item>
       <title>Tìm kiếm với hàm instr trong ASP </title>
       <link>http://www.huyphong.com/hpc.asp?a=vdn&amp;mdn=20&amp;chude_id=6</link>
       <description>&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; TEXT-ALIGN: center&quot; align=left&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;Trong lập trình ASP với cơ sở dữ liệu để tìm kiếm, ta đã quen với&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/SPAN&gt;việc dùng câu lệnh Like để tìm kiếm. Hôm nay tôi trình bày một kinh nghiệm sử dụng hàm instr có sẵn trong ASP để hỗ trợ việc tìm kiếm.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;&lt;?xml:namespace prefix = o ns = &quot;urn:schemas-microsoft-com:office:office&quot; /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;Xem xét hàm tim_kiem sau&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot;&gt;&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;function&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT size=3&gt; tim_kiem(noi_dung, chuoi_tim,dieu_kien)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot;&gt;&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;dim&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT size=3&gt; keywords,keycnt,kq_1,kq_2,kq,kq_tam&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT color=green&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; COLOR: green&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot;&gt;rem đầu tiên đưa các từ cần tìm vào 1 mảng&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;keywords = &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;split&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;(chuoi_tim,&quot; &quot;)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; color=green size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; COLOR: green&quot;&gt;rem đếm số từ cần tìm&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;keycnt = &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;ubound&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;(keywords)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; color=green size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; COLOR: green&quot;&gt;rem gán các giá trị mặc định&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/SPAN&gt;cho các biến&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;kq_1=0&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;kq_2=0&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;kq=0&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;kq_1=instr(1,noi_dung,chuoi_tim,vbTextCompare)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;kq_tam=0&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot;&gt;&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;For Each&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT size=3&gt; word &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;in&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt; keywords&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot;&gt;&lt;SPAN style=&quot;mso-tab-count: 2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;kq_2 = &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;instr&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;(1,noi_dung,word,vbTextCompare)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;&lt;SPAN style=&quot;mso-tab-count: 2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;if&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt; kq_2&amp;gt;0 &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;then&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt; kq_tam=kq_tam+1 &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;end if&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;&lt;SPAN style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;next&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot;&gt;&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;select&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT size=3&gt; &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;case&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt; dieu_kien&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT color=green&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; COLOR: green&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot;&gt;rem nếu điều kiện là “tìm chính xác cụm từ” thì kết quả chính là kq_1&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot;&gt;&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;case&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT size=3&gt; &quot;phrase&quot;:kq=kq_1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT color=green&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; COLOR: green&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot;&gt;rem nếu điều kiện là “tìm tất cả từ” thì nếu kết quả tạm lớn hơn số từ +1 là đúng&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot;&gt;&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;case&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT size=3&gt; &quot;and&quot;:&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;if&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt; kq_tam&amp;gt;=keycnt + 1&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;then&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt; kq=1 &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;else&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt; kq=0 &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;end&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt; &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;if&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT color=green&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; COLOR: green&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot;&gt;rem nếu điều kiện là “tìm ít nhất một từ” thì nếu kết quả tạm lớn hơn 1 là đúng&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot;&gt;&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;case&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT size=3&gt; &quot;or&quot;:&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;if&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt; kq_tam&amp;gt;=1 &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;then&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt; kq=1 &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;else&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt; kq=0 &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;end&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt; &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;if&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot;&gt;end select &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;tim_kiem=kq&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT color=blue&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; color=blue size=3&gt;&lt;SPAN style=&quot;FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: blue; mso-bidi-font-weight: normal&quot;&gt;end function&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;Giải thích&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;Hàm Instr(số_bắt_đầu_tìm, nội_dung,chuỗi_tìm,tùy_chọn) sẽ trả về số thứ tự tìm thấy &lt;I style=&quot;mso-bidi-font-style: normal&quot;&gt;&lt;SPAN style=&quot;FONT-STYLE: italic; mso-bidi-font-style: normal&quot;&gt;chuỗi_tìm&lt;/SPAN&gt;&lt;/I&gt; trong &lt;I style=&quot;mso-bidi-font-style: normal&quot;&gt;&lt;SPAN style=&quot;FONT-STYLE: italic; mso-bidi-font-style: normal&quot;&gt;nội_dung.&lt;/SPAN&gt;&lt;/I&gt; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;Do đó, trong hàm tìm kiếm, đầu tiên ta tách các từ cần tìm vào một mảng tên là keywords. Sau đó kq_1 sẽ là tìm nguyên chuỗi trong nội dung, nếu xuất hiện chuỗi này trong nội dung, kq_1 sẽ lớn hơn 1. Do đó, với điều kiện “tìm chính xác cụm từ”, ta chỉ đơn giản dùng ngay kq_1.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;Với điều kiện “Tìm ít nhất một từ”, ta thấy kq_2 được tăng lên sau từng vòng lặp bằng với số từ tìm kiếm. Do đó chỉ cần kq_2 lớn hơn 1 thì kết quả tìm kiếm sẽ là đúng.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;Với điều kiện “tìm tất cả các từ” thì kq_2 ít nhất phải bằng số từ cần tìm, do đó với điều kiện kq_2&amp;gt;=keycnt+1 thì cho kết quả đúng.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;Phạm vi ứng dụng&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=&quot;Times New Roman&quot; size=3&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt&quot;&gt;Với một số đặc thù công việc tìm kiếm, đôi khi ta cần tìm một lúc trên nhiều trường trong cơ sở dữ liệu, việc sử dụng mệnh đề hoặc (OR) và mệnh đề và (AND) kết hợp với câu lệnh Like trong cơ sở dữ liệu sẽ làm cho hệ thống chạy chậm và câu lệnh phức tạp. Việc đưa một phần công việc tìm kiếm cho ASP xử lý sẽ giúp cơ sở dữ liệu chạy nhanh hơn và kết quả tìm kiếm sẽ tốt hơn.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
       <datePosted>4/17/2026 8:43:30 AM</datePosted>
     </item>
         <item>
       <title>Đổi owner của các bảng trong SQLServer </title>
       <link>http://www.huyphong.com/hpc.asp?a=vdn&amp;mdn=34&amp;chude_id=6</link>
       <description>&lt;P&gt;Với câu lệnh này, bạn sẽ có một danh sách tất cả các bảng cần đổi chủ sở hữu về sa&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SELECT &apos;EXEC(&apos;&apos;sp_changeobjectowner @objname = &apos;&apos;&apos;&apos;&apos; 
+ ltrim(u.name) + &apos;.&apos; + ltrim(s.name) 
+ &apos;&apos;&apos;&apos;&apos;&apos; 
+ &apos;, @newowner = dbo&apos;&apos;)&apos; 
FROM 
sysobjects s, 
sysusers u 
WHERE 
s.uid = u.uid 
AND u.name &amp;lt;&amp;gt; &apos;dbo&apos; 
AND xtype in (&apos;V&apos;, &apos;P&apos;, &apos;U&apos;) 
AND u.name not like &apos;INFORMATION%&apos; 
order by 
s.name &lt;/PRE&gt;</description>
       <datePosted>4/17/2026 8:43:30 AM</datePosted>
     </item>
         <item>
       <title>How to Use Windows XP: Setting Up a Network Printer </title>
       <link>http://www.huyphong.com/hpc.asp?a=vdn&amp;mdn=42&amp;chude_id=6</link>
       <description>&lt;!--/TITLE--&gt;&lt;!-- COPY src=&quot;page_a_1.gif&quot; default=&quot;yes&quot; --&gt;
&lt;TABLE borderColor=#111111 cellSpacing=0 cellPadding=0 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;P&gt;&lt;STRONG&gt;Preparation&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;P&gt;In order to install a network printer, you must know your printer&apos;s &lt;STRONG&gt;Manufacturer&lt;/STRONG&gt;, &lt;STRONG&gt;Model Name&lt;/STRONG&gt;, and &lt;STRONG&gt;IP Address&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The &lt;STRONG&gt;Manufacturer &lt;/STRONG&gt;and&lt;STRONG&gt;&lt;EM&gt; &lt;/EM&gt;Model Name&lt;/STRONG&gt; can be found on the printer case, an example is HP LaserJet 4000N . 
&lt;LI&gt;The &lt;STRONG&gt;IP Address&lt;/STRONG&gt; can be found&amp;nbsp;on a label attached to the printer. An example of the &lt;STRONG&gt;IP Address&lt;/STRONG&gt; is 141.161.888.999. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If your printer does not have a label indicating the &lt;STRONG&gt;IP Address&lt;/STRONG&gt;, or you can&apos;t identify what&amp;nbsp;model it is, please call your &lt;A href=&quot;http://www3.georgetown.edu/uis/content.html?ID=307&quot;&gt;&lt;FONT color=#6188b4&gt;Help Desk&lt;/FONT&gt;&lt;/A&gt;.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;P&gt;&lt;B&gt;Setting Up a Network Printer&lt;/B&gt;&lt;/P&gt;&lt;STRONG&gt;
&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; &lt;EM&gt;Click&lt;/EM&gt; on the &lt;B&gt;Start &lt;/B&gt;button, then&amp;nbsp;&lt;EM&gt;click&lt;/EM&gt; &lt;STRONG&gt;Control Panel&lt;/STRONG&gt;, then &lt;EM&gt;click&lt;/EM&gt;&lt;STRONG&gt; Printers and Faxes&lt;/STRONG&gt;, then &lt;EM&gt;click&lt;/EM&gt;&lt;STRONG&gt; Add Printer&lt;/STRONG&gt;.&lt;/P&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;TABLE borderColor=#111111 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width=&quot;50%&quot;&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD width=&quot;50%&quot;&gt;&lt;IMG height=489 alt=&quot;Click Start, Control Panel, Printers and Faxes, then click Add Printer&quot; hspace=0 src=&quot;http://uis.georgetown.edu/images/software/documentation/winxp/printxp01.gif&quot; width=715 border=1&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;TABLE borderColor=#111111 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width=&quot;50%&quot;&gt;
&lt;P&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt;&lt;EM&gt; &lt;/EM&gt;A new Add Printer Wizard window opens. &lt;EM&gt;Click&lt;/EM&gt;&amp;nbsp;&lt;B&gt;Next&lt;/B&gt;&amp;nbsp;to start.&lt;/P&gt;&lt;/TD&gt;
&lt;TD width=&quot;50%&quot;&gt;&lt;IMG height=388 alt=&quot;Click Next&quot; hspace=0 src=&quot;http://uis.georgetown.edu/images/software/documentation/winxp/printxp02.gif&quot; width=507 border=1&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;TABLE borderColor=#111111 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width=&quot;50%&quot;&gt;
&lt;P&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt;&lt;EM&gt; Select&amp;nbsp;&lt;/EM&gt;&lt;STRONG&gt;Local&amp;nbsp;printer attached to this computer&lt;/STRONG&gt;. Make sure &lt;STRONG&gt;Automatically detect and install my Plug and Play printer &lt;/STRONG&gt;is &lt;FONT color=#800000&gt;&lt;B&gt;NOT &lt;/B&gt;&lt;/FONT&gt;checked. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;4.&lt;/STRONG&gt; Then&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;I&gt;click&lt;/I&gt;&amp;nbsp;&lt;B&gt;Next&lt;/B&gt; to continue.&lt;/P&gt;&lt;/TD&gt;
&lt;TD width=&quot;50%&quot;&gt;&lt;IMG height=387 alt=&quot;Select Local Printer, un-check Automatically Detect, then click Next&quot; hspace=0 src=&quot;http://uis.georgetown.edu/images/software/documentation/winxp/printxp03.gif&quot; width=506 border=1&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;TABLE borderColor=#111111 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width=&quot;50%&quot;&gt;
&lt;P&gt;&lt;STRONG&gt;5.&lt;/STRONG&gt; We will create a new port for your network printer. &lt;EM&gt;Select&amp;nbsp;&lt;/EM&gt;&lt;B&gt;Create a new port&lt;/B&gt;. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;6.&lt;/STRONG&gt; Beside &lt;B&gt;Type of&amp;nbsp;Port&lt;/B&gt;, &lt;I&gt;click&lt;/I&gt; on the &lt;B&gt;down arrow&lt;/B&gt;, then &lt;EM&gt;click &lt;/EM&gt;on &lt;STRONG&gt;Standard TCP/IP Port&lt;/STRONG&gt;. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;7.&lt;/STRONG&gt; &lt;EM&gt;Click&lt;/EM&gt;&amp;nbsp;&lt;B&gt;Next&lt;/B&gt;&amp;nbsp;to continue.&lt;/P&gt;&lt;/TD&gt;
&lt;TD width=&quot;50%&quot;&gt;&lt;IMG height=388 alt=&quot;Select Create a New Port, then use the drop-down arrow to select Standard TCP/IP Port. Click Next.&quot; hspace=0 src=&quot;http://uis.georgetown.edu/images/software/documentation/winxp/printxp04.gif&quot; width=505 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;TABLE borderColor=#111111 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width=&quot;50%&quot;&gt;
&lt;P&gt;&lt;STRONG&gt;8.&lt;/STRONG&gt; A new Add Printer Port Wizard&amp;nbsp;will open. &lt;EM&gt;Click&lt;/EM&gt;&amp;nbsp;&lt;STRONG&gt;Next&lt;/STRONG&gt; to continue.&lt;/P&gt;&lt;/TD&gt;
&lt;TD width=&quot;50%&quot;&gt;&lt;IMG height=494 alt=&quot;Click Next&quot; hspace=0 src=&quot;http://uis.georgetown.edu/images/software/documentation/winxp/printxp05.gif&quot; width=535 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;TABLE borderColor=#111111 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width=&quot;50%&quot;&gt;
&lt;P&gt;&lt;STRONG&gt;9.&lt;/STRONG&gt; You must now &lt;I&gt;type&lt;/I&gt; your printer&apos;s &lt;STRONG&gt;IP Address&lt;/STRONG&gt; in the &lt;STRONG&gt;Printer Name or IP Address&lt;/STRONG&gt; field. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;10.&lt;/STRONG&gt; The &lt;STRONG&gt;Port Name&lt;/STRONG&gt; will automatically be filled&amp;nbsp;when you enter the &lt;STRONG&gt;IP Address&lt;/STRONG&gt;. Do not change the &lt;STRONG&gt;Port Name&lt;/STRONG&gt;. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;11.&lt;/STRONG&gt; &lt;EM&gt;Click&lt;/EM&gt;&amp;nbsp;&lt;B&gt;Next&lt;/B&gt; to continue. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD width=&quot;50%&quot;&gt;&lt;IMG height=495 alt=&quot;Enter the printer IP Address on the top text box.&quot; hspace=0 src=&quot;http://uis.georgetown.edu/images/software/documentation/winxp/printxp06.gif&quot; width=537 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;TABLE borderColor=#111111 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width=&quot;50%&quot;&gt;
&lt;P&gt;&lt;STRONG&gt;12.&lt;/STRONG&gt; IF YOU HAVE PROBLEMS,&amp;nbsp;&lt;STRONG&gt;then you will see the screen on the right.&lt;/STRONG&gt; This means that&amp;nbsp;the IP Address for the printer is NOT available on the network.&amp;nbsp;&lt;EM&gt;Select&lt;/EM&gt; the &lt;STRONG&gt;Back&lt;/STRONG&gt; button and make sure you entered the correct&amp;nbsp;IP Address.&amp;nbsp;Check to see that your network printer is powered on and displays a &apos;ready&apos; status.&lt;/P&gt;&lt;/TD&gt;
&lt;TD width=&quot;50%&quot;&gt;&lt;IMG height=494 alt=&quot;If you see this screen then the printer is not on the network. Retry.&quot; hspace=0 src=&quot;http://uis.georgetown.edu/images/software/documentation/winxp/printxp07.gif&quot; width=535 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;TABLE borderColor=#111111 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width=&quot;50%&quot;&gt;
&lt;P&gt;&lt;STRONG&gt;13.&lt;/STRONG&gt; IF YOU DID NOT&amp;nbsp;HAVE PROBLEMS,&amp;nbsp;&lt;EM&gt;Windows XP&lt;/EM&gt; will scan the network to find your printer&apos;s IP Address. This may take a few seconds.&amp;nbsp;&lt;EM&gt;Select&lt;/EM&gt; &lt;STRONG&gt;Finish&lt;/STRONG&gt; to continue.&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD width=&quot;50%&quot;&gt;&lt;IMG height=494 alt=&quot;If you see this screen you can continue. Click Next.&quot; hspace=0 src=&quot;http://uis.georgetown.edu/images/software/documentation/winxp/printxp08.gif&quot; width=535 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;TABLE borderColor=#111111 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width=&quot;50%&quot;&gt;
&lt;P&gt;&lt;STRONG&gt;14.&lt;/STRONG&gt; You must now select the printer&apos;s manufacturer and model. &lt;EM&gt;Windows XP&lt;/EM&gt; will&amp;nbsp;automatically select the detected&amp;nbsp;manufacturer and printer driver. Normally, you will not have to change this selection. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;15.&lt;/STRONG&gt; OPTIONAL: If your printer is listed but you have more than one printer model to choose from, please select the model with&lt;STRONG&gt;&amp;nbsp;PS&lt;/STRONG&gt;, if available.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;16.&lt;/STRONG&gt; IF your network printer is&amp;nbsp;NOT automatically detected,&amp;nbsp;&lt;EM&gt;select &lt;/EM&gt;the &lt;STRONG&gt;Windows Update&lt;/STRONG&gt; button to find the proper software drivers.&lt;/P&gt;&lt;/TD&gt;
&lt;TD width=&quot;50%&quot;&gt;&lt;IMG height=387 alt=&quot;MS Windows will automatically detect your printer manufacturer and model.&quot; hspace=0 src=&quot;http://uis.georgetown.edu/images/software/documentation/winxp/printxp09.gif&quot; width=505 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;Note&lt;/B&gt;: If your printer is not automatically recognized using Windows Update,&amp;nbsp;please call your &lt;A href=&quot;http://www3.georgetown.edu/uis/content.html?ID=307&quot;&gt;&lt;FONT color=#6188b4&gt;Help Desk&lt;/FONT&gt;&lt;/A&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;TABLE borderColor=#111111 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width=&quot;50%&quot;&gt;
&lt;P&gt;&lt;STRONG&gt;17.&lt;/STRONG&gt; You will be prompted to confirm the selected printer driver. Make sure &lt;STRONG&gt;Keep existing driver&lt;/STRONG&gt; is selected, then&amp;nbsp;&lt;EM&gt;click&lt;/EM&gt; &lt;STRONG&gt;Next &lt;/STRONG&gt;to continue.&lt;/P&gt;&lt;/TD&gt;
&lt;TD width=&quot;50%&quot;&gt;&lt;IMG height=388 alt=&quot;Select Keep Existing Driver, then click Next. &quot; hspace=0 src=&quot;http://uis.georgetown.edu/images/software/documentation/winxp/printxp10.gif&quot; width=506 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;TABLE borderColor=#111111 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width=&quot;50%&quot;&gt;
&lt;P&gt;&lt;STRONG&gt;18.&lt;/STRONG&gt;&lt;EM&gt; &lt;/EM&gt;You will be prompted to assign the printer a &lt;STRONG&gt;Name&lt;/STRONG&gt;. You can use the default name, or add more info to indicate the printer location, such as My Office, Hallway, Foyer, Room 222, etc. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;19.&lt;/STRONG&gt; &lt;EM&gt;Select &lt;/EM&gt;&lt;STRONG&gt;Yes&lt;/STRONG&gt; if&amp;nbsp;you want to use&amp;nbsp;the printer as the default printer.&amp;nbsp;&lt;EM&gt;Click&lt;/EM&gt;&amp;nbsp;&lt;STRONG&gt;Next&lt;/STRONG&gt;&amp;nbsp;to continue.&lt;/P&gt;&lt;/TD&gt;
&lt;TD width=&quot;50%&quot;&gt;&lt;IMG height=387 alt=&quot;Enter a Printer Name. Select Yes if you want to use this printer as the default.&quot; hspace=0 src=&quot;http://uis.georgetown.edu/images/software/documentation/winxp/printxp11.gif&quot; width=506 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;TABLE borderColor=#111111 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width=&quot;50%&quot;&gt;
&lt;P align=left&gt;&lt;STRONG&gt;20.&lt;/STRONG&gt; You will be prompted to share the network printer. Do &lt;B&gt;NOT&lt;/B&gt; share the network printer.&amp;nbsp;&lt;/P&gt;
&lt;P align=left&gt;&lt;STRONG&gt;21.&lt;/STRONG&gt; Click &lt;STRONG&gt;Next &lt;/STRONG&gt;to continue.&lt;/P&gt;&lt;/TD&gt;
&lt;TD width=&quot;50%&quot;&gt;&lt;IMG height=387 alt=&quot;Do NOT share the printer. Enter Next.&quot; hspace=0 src=&quot;http://uis.georgetown.edu/images/software/documentation/winxp/printxp12.gif&quot; width=505 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;TABLE borderColor=#111111 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width=&quot;50%&quot;&gt;
&lt;P align=left&gt;&lt;STRONG&gt;22.&lt;/STRONG&gt; You will be prompted to&amp;nbsp;print a test page.&amp;nbsp;&lt;EM&gt;Select&amp;nbsp;&lt;/EM&gt;&lt;STRONG&gt;Yes&lt;/STRONG&gt;, then &lt;EM&gt;click&amp;nbsp;&lt;/EM&gt;&lt;STRONG&gt;Next&lt;/STRONG&gt;. &lt;/P&gt;
&lt;P align=left&gt;&lt;STRONG&gt;23.&lt;/STRONG&gt; Check your network printer to make sure your page printed. &lt;EM&gt;Select&lt;/EM&gt; &lt;STRONG&gt;Yes &lt;/STRONG&gt;when prompted to confirm a successful test page.&lt;/P&gt;
&lt;P align=left&gt;&lt;STRONG&gt;24.&lt;/STRONG&gt; &lt;EM&gt;Click&lt;/EM&gt; on the &lt;STRONG&gt;Finish&lt;/STRONG&gt; button to complete the Add Printer Wizard.&lt;/P&gt;&lt;/TD&gt;
&lt;TD width=&quot;50%&quot;&gt;&lt;IMG height=388 alt=&quot;Print a test page. Click Next.&quot; hspace=0 src=&quot;http://uis.georgetown.edu/images/software/documentation/winxp/printxp13.gif&quot; width=506 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width=&quot;100%&quot;&gt;
&lt;P align=center&gt;&lt;STRONG&gt;Congratulations!&lt;/STRONG&gt; If your test page printed, you have successfully installed the network printer. &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
       <datePosted>4/17/2026 8:43:30 AM</datePosted>
     </item>
         <item>
       <title>Install Network Printer on Windows XP </title>
       <link>http://www.huyphong.com/hpc.asp?a=vdn&amp;mdn=43&amp;chude_id=6</link>
       <description>&lt;H2&gt;Windows XP&lt;/H2&gt;
&lt;OL&gt;
&lt;LI&gt;To install a network printer first click on &lt;STRONG&gt;Start -&amp;gt; Printers and Faxes&lt;/STRONG&gt; 
&lt;LI&gt;Click on &lt;STRONG&gt;Add a Printer&lt;/STRONG&gt; located on the left toolbar in the window that appears. 
&lt;LI&gt;At the &lt;EM&gt;Welcome To Add Printer Wizard&lt;/EM&gt; screen click &lt;STRONG&gt;Next&lt;/STRONG&gt;. 
&lt;LI&gt;At the next window make sure &lt;STRONG&gt;A Network Printer&lt;/STRONG&gt;… is selected then click&lt;BR&gt;&lt;STRONG&gt;Next&lt;/STRONG&gt;. 
&lt;LI&gt;In the window you can either type in the printer name or you can browse&lt;BR&gt;for the printer. It is recommended that you browse for the printer so make sure&lt;BR&gt;&lt;STRONG&gt;Find a printer in the directory&lt;/STRONG&gt; is selected then click &lt;STRONG&gt;Next&lt;/STRONG&gt;. 
&lt;LI&gt;Make sure &lt;STRONG&gt;Entire Directory &lt;/STRONG&gt;is selected then click &lt;STRONG&gt;Find Now&lt;/STRONG&gt;. 
&lt;LI&gt;Double-click on desired printer. 
&lt;LI&gt;The next window is where you can choose your newly created&lt;BR&gt;printer to be your default printer. Select &lt;STRONG&gt;Yes &lt;/STRONG&gt;or&lt;STRONG&gt; No&lt;/STRONG&gt; then click &lt;STRONG&gt;Next&lt;/STRONG&gt;. 
&lt;LI&gt;You are now finished adding a network printer. Click &lt;STRONG&gt;Finish&lt;/STRONG&gt; and you are ready to&lt;BR&gt;start printing your documents. &lt;/LI&gt;&lt;/OL&gt;
&lt;H2&gt;Windows 2000&lt;/H2&gt;
&lt;OL&gt;
&lt;LI&gt;To install a network printer first click on &lt;STRONG&gt;Start -&amp;gt; Settings -&amp;gt; Printers&lt;/STRONG&gt; 
&lt;LI&gt;From the &lt;EM&gt;Printers Explorer&lt;/EM&gt; window that appears, double-click the &lt;STRONG&gt;Add Printer&lt;/STRONG&gt; icon at the top of the list. 
&lt;LI&gt;The &lt;EM&gt;Add Printer Wizard&lt;/EM&gt; dialog window appears, choose &lt;STRONG&gt;Next&lt;/STRONG&gt;. 
&lt;LI&gt;At the next window make sure &lt;STRONG&gt;Network Printer &lt;/STRONG&gt;is selected then click&lt;BR&gt;&lt;STRONG&gt;Next&lt;/STRONG&gt;. 
&lt;LI&gt;Select the &lt;STRONG&gt;first option&lt;/STRONG&gt; from the list that appears, which is &quot;&lt;STRONG&gt;Find a printer in the Directory&lt;/STRONG&gt;&quot;. Then choose &lt;STRONG&gt;Next&lt;/STRONG&gt;. 
&lt;LI&gt;In the window you can either type in the printer name or you can browse&lt;BR&gt;for the printer. It is recommended that you browse for the printer so make sure&lt;BR&gt;&lt;STRONG&gt;Entire Directory &lt;/STRONG&gt;is selected then click &lt;STRONG&gt;Find Now&lt;/STRONG&gt;. 
&lt;LI&gt;Double-click on desired printer. 
&lt;LI&gt;The next window is where you can choose your newly created&lt;BR&gt;printer to be your default printer. Select &lt;STRONG&gt;Yes &lt;/STRONG&gt;or&lt;STRONG&gt; No&lt;/STRONG&gt; then click &lt;STRONG&gt;Next&lt;/STRONG&gt;. 
&lt;LI&gt;You are now finished adding a network printer. Click &lt;STRONG&gt;Finish&lt;/STRONG&gt; and you are ready to&lt;BR&gt;start printing your documents. &lt;/LI&gt;&lt;/OL&gt;&lt;!-- InstanceEndEditable --&gt;</description>
       <datePosted>4/17/2026 8:43:30 AM</datePosted>
     </item>
         <item>
       <title>Password Generator </title>
       <link>http://www.huyphong.com/hpc.asp?a=vdn&amp;mdn=59&amp;chude_id=6</link>
       <description>&lt;P&gt;Public Function PasswordGenerator(ByVal lngLength As Long)&amp;nbsp;As String&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;BR&gt;On Error GoTo Err_Proc&lt;BR&gt;&amp;nbsp; &lt;BR&gt;&amp;nbsp;Dim iChr As Integer&lt;BR&gt;&amp;nbsp;Dim c As Long&lt;BR&gt;&amp;nbsp;Dim strResult As String&lt;BR&gt;&amp;nbsp;Dim iAsc As String&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;Randomize Timer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;For c = 1 To lngLength&lt;BR&gt;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp; &apos; Randomly decide what set of ASCII chars we will use&lt;BR&gt;&amp;nbsp;&amp;nbsp; iAsc = Int(3 * Rnd + 1)&lt;BR&gt;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &apos;Randomly pick a char from the random set&lt;BR&gt;&amp;nbsp;&amp;nbsp; Select Case iAsc&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case 1&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iChr = Int((Asc(&quot;Z&quot;) - Asc(&quot;A&quot;) + 1) * Rnd + Asc(&quot;A&quot;))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case 2&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iChr = Int((Asc(&quot;z&quot;) - Asc(&quot;a&quot;) + 1) * Rnd + Asc(&quot;a&quot;))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case 3&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iChr = Int((Asc(&quot;9&quot;) - Asc(&quot;0&quot;) + 1) * Rnd + Asc(&quot;0&quot;))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case Else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Err.Raise 20000, , &quot;PasswordGenerator has a problem.&quot;&lt;BR&gt;&amp;nbsp;&amp;nbsp; End Select&lt;BR&gt;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp; strResult = strResult &amp;amp; Chr(iChr)&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;Next c&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;PasswordGenerator = strResult&lt;/P&gt;
&lt;P&gt;End function&lt;/P&gt;</description>
       <datePosted>4/17/2026 8:43:30 AM</datePosted>
     </item>
         <item>
       <title>Checking valid email function </title>
       <link>http://www.huyphong.com/hpc.asp?a=vdn&amp;mdn=61&amp;chude_id=6</link>
       <description>&lt;FONT size=2&gt;
&lt;P&gt;Function RegExpTest(sEmail)&lt;/P&gt;
&lt;P&gt;RegExpTest = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;Dim regEx, retVal&lt;/P&gt;
&lt;P&gt;Set regEx = New RegExp&lt;/P&gt;
&lt;P&gt;&apos; Create regular expression:&lt;/P&gt;
&lt;P&gt;regEx.Pattern =&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;&quot;^[\w-\.]{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,3}$&quot;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/P&gt;
&lt;P&gt;&apos; Set pattern:&lt;/P&gt;
&lt;P&gt;regEx.IgnoreCase = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&apos; Set case sensitivity.&lt;/P&gt;
&lt;P&gt;retVal = regEx.Test(sEmail)&lt;/P&gt;
&lt;P&gt;&apos; Execute the search test.&lt;/P&gt;
&lt;P&gt;If not retVal Then&lt;/P&gt;
&lt;P&gt;exit &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;function&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;End If&lt;/P&gt;
&lt;P&gt;RegExpTest = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;End Function&lt;/P&gt;
&lt;P&gt;Using:&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;blnValidEmail2 = RegExpTest(MasterUser)&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; not blnValidEmail2 then&lt;/P&gt;
&lt;P&gt;err_no=err_no+1&lt;/P&gt;
&lt;P&gt;err_str=err_str &amp;amp; &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;&quot;&amp;lt;li&amp;gt;Please enter the correct email&quot;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;end &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description>
       <datePosted>4/17/2026 8:43:30 AM</datePosted>
     </item>
         <item>
       <title>How do I get the IDENTITY / AUTONUMBER </title>
       <link>http://www.huyphong.com/hpc.asp?a=vdn&amp;mdn=68&amp;chude_id=6</link>
       <description>&lt;STRONG&gt;SQL Server&lt;/STRONG&gt; 
&lt;UL&gt;With SQL Server 2000, there are a couple of new functions that are better than @@IDENTITY. Both of these functions are not global to the connection, which is an important weak point of @@IDENTITY. After doing an insert, you can call:&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;
&lt;TABLE cellSpacing=0 cellPadding=10 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=code&gt;PRINT IDENT_CURRENT(&apos;table&apos;)&amp;nbsp;&lt;BR&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&amp;nbsp;&lt;BR&gt;This will give the most recent IDENTITY value for &apos;table&apos; - regardless of whether you created it or not (this overrides the connection limitation of @@IDENTITY -- which can be useful).&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;Another thing you can do is:&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;
&lt;TABLE cellSpacing=0 cellPadding=10 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=code&gt;PRINT SCOPE_IDENTITY()&amp;nbsp;&lt;BR&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&amp;nbsp;&lt;BR&gt;This will give the IDENTITY value last created within the current stored procedure, trigger, etc. &amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;If you using a version of SQL Server prior to 2000 (or you are in compatibility mode &amp;lt; 80), the best way is to use a single stored procedure that handles both the INSERT and the IDENTITY retrieval using @@IDENTITY.&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;Here is sample code for the stored procedure:&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;
&lt;TABLE cellSpacing=0 cellPadding=10 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=code&gt;CREATE PROCEDURE myProc&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; @param1 INT&amp;nbsp;&lt;BR&gt;AS&amp;nbsp;&lt;BR&gt;BEGIN&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; SET NOCOUNT ON&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; INSERT INTO someTable&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; (&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; intColumn&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; )&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; VALUES&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; (&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @param1&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; )&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; SELECT NEWID = SCOPE_IDENTITY()&amp;nbsp;&lt;BR&gt;END&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&amp;nbsp;&lt;BR&gt;And you would call this from ASP as follows:&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;
&lt;TABLE cellSpacing=0 cellPadding=10 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=code&gt;&amp;lt;%&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; fakeValue = 5&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; set conn = CreateObject(&quot;ADODB.Connection&quot;)&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; conn.open &quot;&amp;lt;conn string&amp;gt;&quot;&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; set rs = conn.execute(&quot;EXEC myProc @param1=&quot; &amp;amp; fakeValue)&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; response.write &quot;New ID was &quot; &amp;amp; rs(0)&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; rs.close: set rs = nothing&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; conn.close: set conn = nothing&amp;nbsp;&lt;BR&gt;%&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&amp;nbsp;&lt;BR&gt;If you are using SQL Server 7.0, simply change the line in the stored procedure from ...&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;
&lt;TABLE cellSpacing=0 cellPadding=10 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=code&gt;SELECT NEWID = SCOPE_IDENTITY()&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&amp;nbsp;&lt;BR&gt;... to ...&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;
&lt;TABLE cellSpacing=0 cellPadding=10 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=code&gt;SELECT NEWID = @@IDENTITY&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&amp;nbsp;&lt;BR&gt;The reason SCOPE_IDENTITY() is preferred over @@IDENTITY is that if you perform an INSERT, and that table has an INSERT TRIGGER which then, in turn, inserts into another table with an IDENTITY column, @@IDENTITY is populated with the second table&apos;s IDENTITY value. So, if you are stuck using SQL Server 7.0 and need a workaround to retrieving the @@IDENTITY value because you have a trigger that also inserts into another IDENTITY-bound table, you&apos;re in luck. You can add this code to the first line of the trigger, but you will have to update all of your application and stored procedure code to deal with this new SELECT:&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;
&lt;TABLE cellSpacing=0 cellPadding=10 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=code&gt;CREATE TRIGGER triggerInsert_tablename ON tablename FOR INSERT AS &amp;nbsp;&lt;BR&gt;BEGIN&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; SELECT @@IDENTITY&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; -- rest of trigger&apos;s logic...&amp;nbsp;&lt;BR&gt;END&amp;nbsp;&lt;BR&gt;GO&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&amp;nbsp;&lt;BR&gt;With that said, there are also potential cases where SCOPE_IDENTITY() can fail, but I think this possibility is more remote than with @@IDENTITY. Observe this repro, provided by David Portas:&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;
&lt;TABLE cellSpacing=0 cellPadding=10 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=code&gt;CREATE TABLE Table1&amp;nbsp;&lt;BR&gt;(&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; i INTEGER IDENTITY(1,1) PRIMARY KEY,&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; x INTEGER NOT NULL UNIQUE&amp;nbsp;&lt;BR&gt;)&amp;nbsp;&lt;BR&gt;GO&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;CREATE TRIGGER trg_Table1 ON Table1&amp;nbsp;&lt;BR&gt;INSTEAD OF INSERT&amp;nbsp;&lt;BR&gt;AS&amp;nbsp;&lt;BR&gt;BEGIN&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; SET NOCOUNT ON&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; INSERT INTO Table1 (x)&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; SELECT x FROM Inserted&amp;nbsp;&lt;BR&gt;END&amp;nbsp;&lt;BR&gt;GO&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;INSERT INTO Table1 (x) VALUES (1)&amp;nbsp;&lt;BR&gt;GO&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;SELECT SCOPE_IDENTITY(), IDENT_CURRENT(&apos;Table1&apos;)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&amp;nbsp;&lt;BR&gt;Result:&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;
&lt;TABLE cellSpacing=0 cellPadding=10 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=code&gt;------ ------&amp;nbsp;&lt;BR&gt;NULL&amp;nbsp;&amp;nbsp;&amp;nbsp;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&amp;nbsp;&lt;BR&gt;This is because the actual INSERT happened outside of the scope of the caller, so SCOPE_IDENTITY() was not populated there. I have requested that the documentation for SCOPE_IDENTITY() be updated to reflect the above scenario.&lt;/UL&gt;&lt;B&gt;Access&lt;/B&gt; 
&lt;UL&gt;Jet/OLEDB provider now supports @@IDENTITY! See &lt;A href=&quot;http://support.microsoft.com/default.aspx/kb/232144&quot; target=_blank&gt;&lt;FONT color=#333399&gt;KB #232144&lt;/FONT&gt;&lt;/A&gt; for more info, and see &lt;A href=&quot;http://www.aspfaq.com/show.asp?id=2126&quot;&gt;&lt;FONT color=#333399&gt;Article #2126&lt;/FONT&gt;&lt;/A&gt; to ensure you are using a Jet/OLEDB connection string.&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;So with that new information, here is the technique for obtaining this value using Access:&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;
&lt;TABLE cellSpacing=0 cellPadding=10 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=code&gt;&amp;lt;%&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; fakeValue = 5&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; set conn = CreateObject(&quot;ADODB.Connection&quot;)&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; conn.open &quot;&amp;lt;conn string&amp;gt;&quot;&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; sql = &quot;INSERT someTable(IntColumn) values(&quot; &amp;amp; fakeValue &amp;amp; &quot;)&quot; &amp;amp; _&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VBCrLf &amp;amp; &quot; SELECT @@IDENTITY&quot;&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; set rs = conn.execute(sql)&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; response.write &quot;New ID was &quot; &amp;amp; rs(0)&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; rs.close: set rs = nothing&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; conn.close: set conn = nothing&amp;nbsp;&lt;BR&gt;%&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&amp;nbsp;&lt;BR&gt;If you are unable to use JET 4.0, you can do a more risky hack like this:&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;
&lt;TABLE cellSpacing=0 cellPadding=10 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=code&gt;&amp;lt;%&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; fakeValue = 5&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; set conn = CreateObject(&quot;ADODB.Connection&quot;)&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; conn.open &quot;&amp;lt;conn string&amp;gt;&quot;&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; conn.execute &quot;INSERT someTable(IntColumn) values(&quot; &amp;amp; fakeValue &amp;amp; &quot;)&quot;&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; set rs = conn.execute(&quot;select MAX(ID) from someTable&quot;)&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; response.write &quot;New ID was &quot; &amp;amp; rs(0)&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; rs.close: set rs = nothing&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; conn.close: set conn = nothing&amp;nbsp;&lt;BR&gt;%&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&amp;nbsp;&lt;BR&gt;This is more risky because it is remotely possible for two people to &quot;cross&quot; inserts, and receive the wrong autonumber value back. To be frank, if there is a possibility of two or more people simultaneously adding records, you should already be considering SQL Server (see &lt;A href=&quot;http://www.aspfaq.com/show.asp?id=2182&quot;&gt;&lt;FONT color=#333399&gt;Article #2182&lt;/FONT&gt;&lt;/A&gt;). However, if you&apos;re stuck with Access and need more security that this won&apos;t happen, you can use a Recordset object with an adOpenKeyset cursor (this is one of those rare scenarios where a Recordset object actually makes more sense than a direct T-SQL statement):&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;
&lt;TABLE cellSpacing=0 cellPadding=10 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=code&gt;&amp;lt;%&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; fakeValue = 5&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; set conn = CreateObject(&quot;ADODB.Connection&quot;)&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; conn.open &quot;&amp;lt;conn string&amp;gt;&quot;&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; set rs = CreateObject(&quot;ADODB.Recordset&quot;)&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; rs.open &quot;SELECT [intColumn] from someTable where 1=0&quot;, conn, 1, 3&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; rs.AddNew&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; rs(&quot;intColumn&quot;) = fakeValue&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; rs.update&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; response.write &quot;New ID was &quot; &amp;amp; rs(&quot;id&quot;)&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; rs.close: set rs = nothing&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; conn.close: set conn = nothing&amp;nbsp;&lt;BR&gt;%&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&amp;nbsp;&lt;BR&gt;&lt;/UL&gt;</description>
       <datePosted>4/17/2026 8:43:30 AM</datePosted>
     </item>
         <item>
       <title>Sử dụng Subquery trong Store Procedure </title>
       <link>http://www.huyphong.com/hpc.asp?a=vdn&amp;mdn=70&amp;chude_id=6</link>
       <description>CREATE procedure search_candidates(@candidate_list varchar(1000))&lt;BR&gt;as&lt;BR&gt;declare @sql varchar(1000)&lt;BR&gt;set @sql=&apos;select * from candidates where candidate_id in (&apos;+ @candidate_list +&apos;)&apos;&lt;BR&gt;execute(@sql)&lt;BR&gt;GO&lt;BR&gt;</description>
       <datePosted>4/17/2026 8:43:30 AM</datePosted>
     </item>
         <item>
       <title>Many-to-many selections query </title>
       <link>http://www.huyphong.com/hpc.asp?a=vdn&amp;mdn=71&amp;chude_id=6</link>
       <description>&lt;P&gt;Table: candidate_skills&lt;BR&gt;candidate_id (PKey)&lt;BR&gt;skill_id (PKey)&lt;BR&gt;&lt;BR&gt;Table: skills&lt;BR&gt;skill_id (PKey)&lt;BR&gt;&lt;BR&gt;Table: job_skill_required&lt;BR&gt;job_id(PKey)&lt;BR&gt;skill_id(PKey)&lt;BR&gt;&lt;/P&gt;
&lt;DIV dir=ltr style=&quot;TEXT-ALIGN: left&quot;&gt;select candidate_id &lt;BR&gt;&amp;nbsp; from candidate_skills&lt;BR&gt;where skill_id &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; in ( select skill_id&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from job_skill_required&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where job_id = 937 )&lt;BR&gt;group&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by candidate_id&lt;BR&gt;having count(*)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = ( select count(*)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from job_skill_required&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where job_id = 937 )&lt;/DIV&gt;</description>
       <datePosted>4/17/2026 8:43:30 AM</datePosted>
     </item>
         <item>
       <title>Để không mất email trong outlook khi cài đặt lại máy </title>
       <link>http://www.huyphong.com/hpc.asp?a=vdn&amp;mdn=108&amp;chude_id=6</link>
       <description>&lt;DIV class=Section1&gt;
&lt;P class=MsoNormal&gt;Hàng ngày bạn dùng email bằng Outlook Express đi kèm &lt;SPAN class=GramE&gt;theo&lt;/SPAN&gt; máy và một hôm bạn cài đặt lại máy tính, thế là toàn bộ email đã không cánh mà bay. &lt;SPAN class=GramE&gt;Thật đáng sợ phải không, vài thủ thuật nhỏ sau đây sẽ giúp bạn làm chủ tình hình này.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;?xml:namespace prefix = o ns = &quot;urn:schemas-microsoft-com:office:office&quot; /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Outlook Express đi kèm &lt;SPAN class=GramE&gt;theo&lt;/SPAN&gt; MS Windows lưu email trong thư mục mặc định là &lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;I style=&quot;mso-bidi-font-style: normal&quot;&gt;\Documents and Settings\&amp;lt;UserName&amp;gt;\Local Settings\Application Data\Identities&lt;SPAN class=GramE&gt;\{&lt;/SPAN&gt;64A1561A-9785-42DF-BFEA-B8E5642D05D6}\Microsoft\Outlook Express&lt;o:p&gt;&lt;/o:p&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Và Microsoft Outlook lưu trong &lt;I style=&quot;mso-bidi-font-style: normal&quot;&gt;\Documents and Settings\&amp;lt;UserName&amp;gt;\Local Settings\Application Data\Microsoft\Outlook&lt;o:p&gt;&lt;/o:p&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;I style=&quot;mso-bidi-font-style: normal&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Do đó khi cài lại máy, nhất là khi phải format lại mà quên không copy file trong &lt;SPAN class=GramE&gt;thư&lt;/SPAN&gt; mục này thì rất dễ mất hết email. Để đơn giản vấn đề thì chỉ cần đổi đường dẫn đến &lt;SPAN class=GramE&gt;thư&lt;/SPAN&gt; mục cá nhân là xong. &lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Với Outlook Express, các bạn sẽ tìm thấy chỗ thay đổi đường dẫn: Menu &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;Tools-&amp;gt;Options-&amp;gt;Maintenace-&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;?xml:namespace prefix = v ns = &quot;urn:schemas-microsoft-com:vml&quot; /&gt;&lt;v:shapetype id=_x0000_t75 path=&quot; m@4@5 l@4@11@9@11@9@5 xe&quot; stroked=&quot;f&quot; filled=&quot;f&quot; o:spt=&quot;75&quot; o:preferrelative=&quot;t&quot; coordsize=&quot;21600,21600&quot;&gt;&lt;v:stroke joinstyle=&quot;miter&quot;&gt;&lt;/v:stroke&gt;&lt;v:formulas&gt;&lt;v:f eqn=&quot;if lineDrawn pixelLineWidth 0 &quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;sum @0 1 0 &quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;sum 0 0 @1 &quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;prod @2 1 2 &quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;prod @3 21600 pixelWidth &quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;prod @3 21600 pixelHeight &quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;sum @0 0 1 &quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;prod @6 1 2 &quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;prod @7 21600 pixelWidth &quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;sum @8 21600 0 &quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;prod @7 21600 pixelHeight &quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;sum @10 21600 0 &quot;&gt;&lt;/v:f&gt;&lt;/v:formulas&gt;&lt;v:path o:connecttype=&quot;rect&quot; gradientshapeok=&quot;t&quot; o:extrusionok=&quot;f&quot;&gt;&lt;/v:path&gt;&lt;o:lock v:ext=&quot;edit&quot; aspectratio=&quot;t&quot;&gt;&lt;/o:lock&gt;&lt;/v:shapetype&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Ví dụ: tạo thư mục Email trong ổ đĩa cá nhân, sau đó chọn và bấm Ok, thế là các mail sẽ được lưu ở chỗ mới, trong trường hợp email đã có sẵn, thì copy các file email cũ vào thư mục mới là xong.&lt;/P&gt;
&lt;P class=MsoNormal&gt;Chú ý quan trọng: với các hộp mail đã có sẵn, khi copy vào &lt;SPAN class=GramE&gt;thư&lt;/SPAN&gt; mục mới, phải bỏ thuộc tính readonly đi thì Outlook Express mới đọc được.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;Với Microsoft Outlook thì vào Menu &lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;Tools-&amp;gt;Options-&amp;gt;Mail setup-&amp;gt;Data Files&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Chỉ cần chuyển file ra &lt;SPAN class=GramE&gt;thư&lt;/SPAN&gt; mục khác rồi Add vào lại là xong&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Bằng việc để email và các dữ liệu cá nhân vào một ổ đĩa khác, thế là bạn có thể yên tâm hơn khỏi lo ngay ngáy chuyện mất email nữa&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
       <datePosted>4/17/2026 8:43:30 AM</datePosted>
     </item>
         <item>
       <title>How to decrease the Size of the Transaction Log in SQL Server 2000 </title>
       <link>http://www.huyphong.com/hpc.asp?a=vdn&amp;mdn=120&amp;chude_id=6</link>
       <description>&lt;TABLE style=&quot;BORDER-COLLAPSE: collapse&quot; borderColor=#111111 height=20 cellSpacing=0 cellPadding=0 width=801 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=666&gt;
&lt;H1&gt;&lt;FONT size=4&gt;How to decrease the Size of the Transaction Log in SQL Server 2000&lt;/FONT&gt;&lt;/H1&gt;
&lt;HR align=left color=#34b389 noShade&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;TABLE style=&quot;BORDER-COLLAPSE: collapse&quot; borderColor=#111111 cellSpacing=0 cellPadding=4 width=800 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=790&gt;
&lt;H1 align=left&gt;&lt;FONT size=4&gt;Overview&lt;/FONT&gt;&lt;/H1&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Every Microsoft SQL Server 2000 database has a transaction log that records all transactions and the database modifications made by each transaction. This record of transactions and their modifications supports three operations:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Recovery of individual transactions 
&lt;LI&gt;Recovery of all incomplete transactions when SQL Server is started 
&lt;LI&gt;Rolling a restored database forward to the point of failure &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If log records were never deleted from the transaction log, the logical log would grow &lt;B&gt;until it filled all the available space on the disks&lt;/B&gt; holding the physical log files. At some point in time, old log records no longer necessary for recovering or restoring a database must be deleted to make way for new log records.&lt;/P&gt;
&lt;P&gt;SQL Server 2000 has to options to decrease the size of the Transaction Log:&lt;/P&gt;
&lt;TABLE id=AutoNumber1 style=&quot;BORDER-COLLAPSE: collapse&quot; borderColor=#111111 height=62 cellSpacing=0 cellPadding=0 width=&quot;90%&quot; border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=&quot;5%&quot; height=46&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD vAlign=top width=&quot;5%&quot; height=46&gt;1.&lt;/TD&gt;
&lt;TD vAlign=top width=&quot;93%&quot; height=46&gt;&lt;B&gt;Log truncation&lt;/B&gt; does not reduce the size of a physical log file, it reduces the size of the logical log and marks as inactive the virtual logs that do not hold any part of the logical log.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=&quot;5%&quot; height=16&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=&quot;5%&quot; height=16&gt;2.&lt;/TD&gt;
&lt;TD vAlign=top width=&quot;93%&quot; height=16&gt;&lt;B&gt;Log shrinking&lt;/B&gt; removes enough inactive virtual logs to reduce the log file to the requested size.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;
&lt;H1&gt;Example&lt;/H1&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Here is an example how boths steps can be performed:&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P class=big&gt;Database is in FULL Recovery Mode&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=courier&gt;&lt;B&gt;&lt;FONT color=#008000&gt;# For this example we switch to FULL Mode&lt;/FONT&gt;&lt;BR&gt;USE master&lt;BR&gt;ALTER DATABASE Curia SET RECOVERY FULL;&lt;BR&gt;GO&lt;BR&gt;&lt;/B&gt;&lt;FONT color=#0000ff&gt;The command(s) completed successfully.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=courier&gt;&lt;B&gt;&lt;FONT color=#008000&gt;# Add logical Devices for the Backup (The directories must exist!)&lt;/FONT&gt;&lt;BR&gt;EXEC sp_addumpdevice &apos;disk&apos;, &apos;curia_dat&apos;,&lt;BR&gt;&apos;C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\curia_dat.dat&apos;&lt;BR&gt;GO&lt;BR&gt;&lt;/B&gt;&lt;FONT color=#0000ff&gt;(1 row(s) affected)&lt;BR&gt;&apos;Disk&apos; device added.&lt;BR&gt;&lt;/FONT&gt;&lt;B&gt;&lt;BR&gt;EXEC sp_addumpdevice &apos;disk&apos;, &apos;curia_log&apos;,&lt;BR&gt;&apos;C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\curia_log.dat&apos;&lt;BR&gt;GO&lt;BR&gt;&lt;/B&gt;&lt;FONT color=#0000ff&gt;(1 row(s) affected)&lt;BR&gt;&apos;Disk&apos; device added.&lt;/FONT&gt;&lt;B&gt;&lt;BR&gt;&lt;FONT color=#2b9f6d&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#008000&gt;# Create a Backup before Truncating / Shrinking&lt;/FONT&gt;&lt;BR&gt;BACKUP DATABASE Curia TO curia_dat&lt;BR&gt;GO&lt;BR&gt;&lt;/B&gt;&lt;FONT color=#0000ff&gt;Processed 26392 pages for database &apos;Curia&apos;, file &apos;MigrationBasisplus_Data&apos; on file 9.&lt;BR&gt;Processed 1 pages for database &apos;Curia&apos;, file &apos;MigrationBasisplus_Log&apos; on file 9.&lt;BR&gt;BACKUP DATABASE successfully processed 26393 pages in 9.756 seconds (22.161 MB/sec).&lt;/FONT&gt;&lt;B&gt;&lt;BR&gt;&lt;BR&gt;BACKUP LOG Curia TO curia_log&lt;BR&gt;GO&lt;BR&gt;&lt;/B&gt;&lt;FONT color=#0000ff&gt;Processed 1 pages for database &apos;Curia&apos;, file &apos;MigrationBasisplus_Log&apos; on file 5.&lt;BR&gt;BACKUP LOG successfully processed 1 pages in 0.065 seconds (0.039 MB/sec).&lt;/FONT&gt;&lt;B&gt;&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#008000&gt;# Truncate the Transaction Log&lt;/FONT&gt;&lt;FONT color=#2b9f6d&gt;&lt;BR&gt;&lt;/FONT&gt;BACKUP LOG Curia WITH TRUNCATE_ONLY&lt;BR&gt;GO&lt;BR&gt;&lt;/B&gt;&lt;FONT color=#0000ff&gt;The command(s) completed successfully.&lt;/FONT&gt;&lt;B&gt;&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#008000&gt;# Drop logical Devices&lt;/FONT&gt;&lt;BR&gt;sp_dropdevice &apos;curia_dat&apos;&lt;BR&gt;GO&lt;BR&gt;&lt;/B&gt;&lt;FONT color=#0000ff&gt;Device dropped.&lt;/FONT&gt;&lt;B&gt;&lt;BR&gt;&lt;BR&gt;sp_dropdevice &apos;curia_log&apos;&lt;BR&gt;GO&lt;BR&gt;&lt;/B&gt;&lt;FONT color=#0000ff&gt;Device dropped.&lt;/FONT&gt;&lt;B&gt;&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#008000&gt;# Get the Name of the Transaction Log&lt;/FONT&gt;&lt;FONT color=#34b389&gt;&lt;BR&gt;&lt;/FONT&gt;USE curia&lt;BR&gt;SELECT name FROM dbo.sysfiles&lt;BR&gt;GO&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#008000&gt;# Shrink the physical Size of the Transaction Log to 20MB&lt;/FONT&gt;&lt;BR&gt;USE curia&lt;BR&gt;DBCC SHRINKFILE (MigrationBasisplus_Log, 20)&lt;BR&gt;GO&lt;/B&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P class=big&gt;Database is in SIMPLE Recovery Mode&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=courier&gt;&lt;B&gt;&lt;FONT color=#008000&gt;# For this example we switch to SIMPLE Mode&lt;/FONT&gt;&lt;BR&gt;USE master&lt;BR&gt;ALTER DATABASE Curia SET RECOVERY SIMPLE;&lt;BR&gt;GO&lt;BR&gt;&lt;/B&gt;&lt;FONT color=#0000ff&gt;The command(s) completed successfully.&lt;/FONT&gt;&lt;B&gt;&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#008000&gt;# Add logical Device for the Backup (The directories must exist!)&lt;/FONT&gt;&lt;BR&gt;EXEC sp_addumpdevice &apos;disk&apos;, &apos;curia_dat&apos;,&lt;BR&gt;&apos;C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\curia_dat.dat&apos;&lt;BR&gt;GO&lt;BR&gt;&lt;/B&gt;&lt;FONT color=#0000ff&gt;(1 row(s) affected)&lt;BR&gt;&apos;Disk&apos; device added.&lt;/FONT&gt;&lt;B&gt;&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#008000&gt;# Create a Backup before Truncating / Shrinking&lt;/FONT&gt;&lt;BR&gt;BACKUP DATABASE Curia TO curia_dat&lt;BR&gt;GO&lt;BR&gt;&lt;/B&gt;&lt;FONT color=#0000ff&gt;Processed 26392 pages for database &apos;Curia&apos;, file &apos;MigrationBasisplus_Data&apos; on file 9.&lt;BR&gt;Processed 1 pages for database &apos;Curia&apos;, file &apos;MigrationBasisplus_Log&apos; on file 9.&lt;BR&gt;BACKUP DATABASE successfully processed 26393 pages in 9.756 seconds (22.161 MB/sec).&lt;/FONT&gt;&lt;B&gt;&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#008000&gt;# Truncate the Transaction Log&lt;/FONT&gt;&lt;BR&gt;BACKUP LOG Curia WITH TRUNCATE_ONLY&lt;BR&gt;GO&lt;BR&gt;&lt;/B&gt;&lt;FONT color=#0000ff&gt;The command(s) completed successfully.&lt;/FONT&gt;&lt;B&gt;&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#008000&gt;# Drop logical Device&lt;/FONT&gt;&lt;BR&gt;sp_dropdevice &apos;curia_dat&apos;&lt;BR&gt;GO&lt;BR&gt;&lt;/B&gt;&lt;FONT color=#0000ff&gt;Device dropped.&lt;/FONT&gt;&lt;B&gt;&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#008000&gt;# Get the Name of the Transaction Log&lt;/FONT&gt;&lt;BR&gt;USE curia&lt;BR&gt;SELECT name FROM dbo.sysfiles&lt;BR&gt;GO&lt;BR&gt;&lt;/B&gt;&lt;FONT color=#0000ff&gt;The command(s) completed successfully.&lt;/FONT&gt;&lt;B&gt;&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#008000&gt;# Shrink the physical Size of the Transaction Log to 20MB&lt;/FONT&gt;&lt;BR&gt;USE curia&lt;BR&gt;DBCC SHRINKFILE (MigrationBasisplus_Log, 20)&lt;BR&gt;GO&lt;/B&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P class=big&gt;More Information&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=normal&gt;&lt;A href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_dbcc_8b51.asp&quot;&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_dbcc_8b51.asp&lt;/A&gt;&lt;BR&gt;&lt;A href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da2_876t.asp&quot;&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da2_876t.asp&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
       <datePosted>4/17/2026 8:43:30 AM</datePosted>
     </item>
         <item>
       <title>Download Source Code HPBlog </title>
       <link>http://www.huyphong.com/hpc.asp?a=vdn&amp;mdn=122&amp;chude_id=6</link>
       <description>&lt;P&gt;Chào các bạn, như các bạn đã biết website huyphong.com sử dụng mã nguồn từ phần mềm HPBlog(Do chính Huy Phong phát triển và đã được cấp giấy chứng nhận bản quyền số 502/2006/QTG do Cục bản quyền tác giả cấp ngày 17/3/2006). Cách đây vài bữa, có một bạn hỏi xin phần mềm này. Và từ hôm nay các bạn có thể &lt;A href=&quot;http://www.huyphong.com/downloads/hpblog.rar&quot;&gt;download &lt;/A&gt;miễn phí phần mềm này để có thể phát triển những web cá nhân cho riêng mình.&lt;/P&gt;
&lt;P&gt;Xin cảm ơn các bạn đã quan tâm và ủng hộ Huy Phong trong thời gian qua.&lt;/P&gt;
&lt;P&gt;Huy Phong&lt;/P&gt;
&lt;P&gt;PS. Nếu các bạn phát triển website mà chưa có chỗ hosting thì đừng ngại liên lạc với Huy Phong để có 1 gói hosting phù hợp với mức giá từ $1/tháng nhé.&lt;/P&gt;</description>
       <datePosted>4/17/2026 8:43:30 AM</datePosted>
     </item>
         <item>
       <title>IIS 7 </title>
       <link>http://www.huyphong.com/hpc.asp?a=vdn&amp;mdn=129&amp;chude_id=6</link>
       <description>cscript %systemdrive%\inetpub\adminiscripts\adsutil.vbs set w3svc/AspScriptErrorSentToBrowser true</description>
       <datePosted>4/17/2026 8:43:30 AM</datePosted>
     </item>
         <item>
       <title>Vista </title>
       <link>http://www.huyphong.com/hpc.asp?a=vdn&amp;mdn=130&amp;chude_id=6</link>
       <description>&lt;P&gt;Những kinh nghiệm khi sử dụng Windows Vista (Sưu tầm)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;You&apos;ll like this.&lt;/H2&gt;
&lt;P&gt;On your Windows Vista machine, launch a command prompt as administrator.&amp;nbsp; Navigate to the windows\system32 folder and type:&lt;/P&gt;
&lt;P&gt;ribbons.scr /p65552&lt;/P&gt;
&lt;P&gt;Enjoy&lt;/P&gt;
&lt;P&gt;Dave&lt;/P&gt;
&lt;P&gt;&lt;A href=&quot;http://blogs.technet.com/daven/archive/2006/12/02/you-ll-like-this.aspx&quot;&gt;From here&lt;/A&gt;&lt;/P&gt;</description>
       <datePosted>4/17/2026 8:43:30 AM</datePosted>
     </item>
     </channel>
     </rss>
