CasperP Posted January 31, 2019 #1 Share Posted January 31, 2019 Hi Swyx forum I'm trying to make a script that will do. When the supporter call a customer and the customer do not take the phone but call back later it will return the call back to the supporter. But it's not working and i am kinda stuck what to do know. Function Callback(lokal) Dim bReturn Dim Strcs Strcs = "Provider=SQLOLEDB;Data Source=*********;Initial Catalog=DB_*********;User ID=USER;Password=*********" ' open connection to database Dim db db = CreateObject("ADODB.Connection") db.Open(Strcs) ' open recordset Dim sSQL Dim rs sSQL = "select * from IpPbxCDR where CalledNumber = '" & _ IpPbx.CallingNumber & "'" rs = CreateObject("ADODB.Recordset") rs.Open(sSQL, db, adOpenDynamic, adLockOptimistic, adCmdText) lokal = rs("OriginationNumber") bReturn = not rs.EOF ' destroy var rs.Close rs = Nothing db.Close db = Nothing Callback = bReturn End Function Link to comment Share on other sites More sharing options...
Tom Wellige Posted September 1, 2019 #2 Share Posted September 1, 2019 In case the problem this persists, there is a syntax error in your code. At the marked position a "_" character (underline) is missing to tell VBScript that the command continues in the next line. Alternatively you can also remove the line feed from there so that "adCmdText)" follows immediately after the "," in the same line. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now