As per previous post... (are you having a race to see who can get it going
first?)
ConnectionString="DSN=WSH;UID=gzInetAdmin;APP=WSH;WSID=BatchPC;DATABASE=WSH
;
UseProcForPrepare=0"
Set WshShell = WScript.CreateObject("WScript.Shell")
Set Conn = WScript.CreateObject("ADODB.Connection")
Conn.Open ConnectionString,"gzInetAdmin","password"
set rsLookup = Wscript.CreateObject("ADODB.Recordset")
SQLText="SELECT * From Subject"
rsLookUp.open SQLText, Conn,0,1
Do Until RSLookup.EOF
WshShell.popup rsLookup("SubjectName")
RSLookup.MoveNext
Loop
Regards,
Ian Morrish
http://wsh.glazier.co.nz WSHFAQ
http://ils.glazier.co.nz (NetMeeting)
http://www.glazier.co.nz
Quote:
>I'm trying to access an MS ACCESS DB via ADO using WSH. I've ported my ASP
>code thinking that it would work, however I can't get it to work at all.
>The script bombs on the connection string. Does anybody have a snippet of
>code for creating an ado connection and inserting a record using WSH?
>Thanks.