ericdevy Report post Posted 09/27/2007 07:16 AM Hi, i need an example of a vbs script that wil query a dbase3 database and return the results to voiceguide to be read back to the caller.Any help would be greatly appreciated. Share this post Link to post
SupportTeam Report post Posted 09/27/2007 08:33 AM Here are a few useful links: HOW TO: Use Jet OLE DB Provider 4.0 to Connect to ISAM Databases http://support.microsoft.com/kb/326548 and: http://www.voiceguide.com/vghelp/source/html/modvbs.htm eg: set vg = CreateObject("VoiceGuide.CommandLink") set cn = CreateObject("ADODB.Connection") set rs = CreateObject("ADODB.Recordset") cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\somepath;Extended Properties=DBASE III;" if cn.State <> 1 then vg.Admin_TraceLogAdd iLineId, 5, "login connection to database could not be made" vg.Run_ResultReturn iLineId, "fail" WScript.Quit end if set rs.ActiveConnection = cn sSQL = "SELECT TOP 1 AdID, Filename, PlayCount, LastPlayTime FROM AdList WHERE PlayCount < PlayCountMax AND Active <> 0 ORDER BY LastPlayTime" rs.Open sSQL, cn, 3 if rs.RecordCount <= 0 then rs.Close vg.Admin_TraceLogAdd iLineId, 5, "no records retrieved" else iAdID = rs.Fields("AdID").Value sFilename = rs.Fields("Filename").Value iPlayCount = rs.Fields("PlayCount").Value dateLastPlayTime = rs.Fields("LastPlayTime").Value rs.Close strResultVars= "[Filename]{" & sFilename & "}[LastPlayTime]{" & dateLastPlayTime & "}" vg.Run_ResultReturn $RV_LINEID, strResultVars end if cn.Close set rs = Nothing set cn = Nothing set vg = Nothing And you can then use $RV[Filename] and $RV[LastPlayTime] in the VoiceGuide script. Share this post Link to post