% Dim objConn Dim objRS Dim strDSN Dim strSQL Dim tipContent Dim tipHead Const adOpenStatic = 3 Const adLockReadOnly = 1 Set objConn = Server.CreateObject("ADODB.Connection") Set objRS = Server.CreateObject("ADODB.Recordset") objConn.Open MM_TGM_STRING strSQL = "use TGM SELECT * FROM tips WHERE status = 1" objRS.Open strSQL, objConn, adOpenStatic,adLockReadOnly tipContent = "htmlcode += '" & objRS("tip") & "'" whichFN=server.mappath("script/tipsMonth.js") ' first, create the file out of thin air Set fstemp = server.CreateObject("Scripting.FileSystemObject") Set filetemp = fstemp.CreateTextFile(whichFN, true) ' true = file can be over-written if it exists ' false = file CANNOT be over-written if it exists tipHead = "htmlcode += '
Tip of the Month |
More Tips ![]() |