Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
On Error Resume Next
Set fso = CreateObject("Wscript.FileSystemObject")
[green]'I was having errors building the engine object, I think [/green]
[green]'it is because I have AccessXP instaled.
' With any luck it will work for your.. In VB it worked
'fine, it just went wacko when I turneed it into a
'vbscript. Try the .35 syntax if the first fails.
[/green]'
Set dbe = CreateObject("Dao.DBEngine")
[green] 'Set dbe = CreateObject("DAO.DBEngine.35")[/green]
if err.number <> 0 then
msgbox "No engine"
end if
Set cn = CreateObject("Adodb.Connection")
Set db = dbe.OpenDatabase([red][i]"E:\databases\Directions.mdb"[/i][/red])
cn.Open "provider=sqloledb;server=[red][i]localhost[/i][/red];database=[red][i]test[/i][/red];integrated security=sspi"
Set ts = fso.OpenTextFile("c:\viewerrors.txt", 2, True)
For Each qd In db.QueryDefs
cn.Execute "Create View dbo." & Replace(qd.Name, "~", "") & " as " & Replace(UCase(qd.SQL), "DISTINCTROW", "Distinct")
If Err.Number <> 0 Then
ts.WriteLine "QueryDef Create Failure: " & qd.Name & "; " & qd.SQL
Err.Clear
End If
Next
ts.Close
Set ts = nothng
Set fso = Nothing
cn.Close
Set cn = Nothing
db.Close
Set db = Nothing
Set dbe = Nothing
msgbox "Done"