1. Mailmerge from Access
If you are tired of
typing letter after letter out to your clients when all their details are in
your Access database, check out this SSW web page which shows you how to do a
mail merge from Access. Lavishly illustrated with screenshots, it is a guide
even a beginner can follow!
2. Execute two select
statements as one in ADO
Your can execute two
select statements as one. Using this feature you can then execute a SQL
statement with multiple return recordsets using one recordset object. The
following code shows you how to use two recordsets with one recordset object.
To do this you have to use the NEXTRECORDSET method of the recordset Object.
'---For this Demo, get CustID---
set conn= server.CreateObject("Adodb.connection")
set cmd = server.CreateObject("Adodb.command")
.ConnectionString="Provider=SQLOLEDB.1;Persist Security Info=False;User
ID=sa;Initial Catalog=Northwind;Data Source=ALPACA"
'---2 select statements----
strSql="select * from Customers Where CustomerID " & strCustID
strSql= strSql & vbNewLine
strSql=strSql & "Select * from Orders Where CustomerID " & strCustID
do until rst.eof
Response.Write rst("companyname") &"<br>"
Response.Write "======Order Date======"
do until rst.eof
Response.Write rst("OrderDate") &"<br>
set cmd=nothing set conn=nothing
Copy and Paste in Command
When working in a
Command Window, you can use the mouse to highlight a block of text to copy once
highlighted, pressing Enter will copy the text to the clipboard. To paste the
text (or any text from the clipboard) back into the Command Window, click the
right mouse button on the Command Window.
Got a hot tip you want
to share? Tip