VoiceGuide IVR Software Main Page
Jump to content

Take attendence to display Staff Name

Recommended Posts

 Dear Sir

   I have already create below code to record the staff ID for attendence , Can I query the sql to output staff name ?

 

Type=Run VB Script
DispSize=69
Txt=Save entered data to a file using VBScript
VbsFileToRun=
VbsWait=1
VbScript=
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
set fso = CreateObject("Scripting.FileSystemObject")
set tsFile = fso.OpenTextFile("c:\Program Files\VoiceGuide\Scripts\Meter Reading\IVRattendence.txt", ForAppending, True)

If $RV_HH > 12 Then

 ihh =right("0" &cstr($RV_HH - 12),2)

 tsFile.WriteLine "20$RV_YY/$RV_MM/$RV_DD PM " & ihh & ":$RV_NN:$RV_SS" & vbTab & "$RV_CIDNUMBER" & vbTab & "$RV[GetID]"

Else

  tsFile.WriteLine "20$RV_YY/$RV_MM/$RV_DD AM $RV_HH:$RV_NN:$RV_SS" & vbTab & "$RV_CIDNUMBER" & VbTab & "$RV[GetID]"

End If

tsFile.Close
set tsFile = Nothing
set fso = Nothing
VbsHoldPlay=
on {success} goto [ThankA]
on {fail} goto [ThankA]
on {timeout 0} goto [ThankA]

Position=63,365

[OLD Save Data to File_18]
Type=Run Program
DispSize=69
Txt=Echo the entered data to a file. This DOS Command line  approach will result in the saved data being mangled if more the one line writes to the file at precisely the same time.
ProgramToRun=command.com /c echo $RV[GetID] >> c:\Program Files\VoiceGuide\Scripts\Meter Reading\IVRAttendence.txt
RunHoldPlay=

Share this post


Link to post

dear sir

since the staff I'd take from IVR text file as above script. how to take ID from the text to query SQL. 

on the other hand . can I query excel file

Share this post


Link to post
Quote

since the staff I'd take from IVR text file as above script. how to take ID from the text to query SQL. 

Do you want to read the name information in from text file? It's possible to use the ODBC driver "Microsoft Text Driver (*.txt; *.csv)" to do that, but this requires that the rest of the Connection String be correctly specified to match your text file format. Its possible, but its simpler to just put your data in a database and read from there. For small systems you can even use MS Access as the database.

 

Quote

can I query excel file

Please see the "Microsoft Excel Example" at the bottom of the Database Query module Help file entry:

https://www.voiceguide.com/vghelp/source/html/moddbquery.htm

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×