Gamingphreek
Lifer
Code:
Function PrintSystemTable()
Set con = CreateObject("ADODB.Connection")
'get fs object
'Set objFSO = CreateObject("Scripting.FileSystemObject")
'get path to the database
'sPathToDatabase = objFSO.GetAbsolutePathName("SaveData\SaveData.accdb")
'sPathToDatabase = objFSO.GetAbsolutePathName("SaveData.accdb")
Set oShell = CreateObject("WScript.Shell")
Set ofso = CreateObject("Scripting.FileSystemObject")
oShell.CurrentDirectory = ofso.GetParentFolderName(WScript.ScriptFullName)
theDirectory = ofso.GetParentFolderName(WScript.ScriptFullName)
'document.write("sPathToDatabase = " & sPathToDatabase)
con.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=.\SaveData\SaveData.accdb"
document.write("<table class=satelliteList>")
document.write("<tr>")
document.write("<td>Select</td>")
document.write("<td>System Name</td>")
document.write("<td>Description</td>")
document.write("<td>Files</td>")
document.write("</tr>")
document.write("</table>")
con.Close
End Function
I keep getting "Object Required: WScript" errors while trying to run this from IE. Is this because IE does not support a WScript object?
All the code needs to do is grab the current directory of this script.
-Kevin