JRoemer Posted December 27, 2017 #1 Share Posted December 27, 2017 I have some problems to get my vb script to works. i want to write some information i the "projectnumber" in the CDR database from my GSE script. But i get a callrouting error, But if i running the vbs script from a command prompt it works ' open recordset Dim Source Dim Connect Dim rs Source = "update IpPbxCDR set ProjectNumber = 12222 where CallId =" & CallId Connect = "Provider=SQLOLEDB;Data Source=localhost\sqlexpress;Initial Catalog=SwyxCDR;User ID=xx;Password=xxyy" Set rs = CreateObject("ADODB.Recordset") rs.Open Source, Connect, adOpenKeyset Link to comment Share on other sites More sharing options...
Tom Wellige Posted December 28, 2017 #2 Share Posted December 28, 2017 Before being able to access data in a database using the RecordSet object, you need to instantiate a Connection object and open the connection to the database. You can find an example here: http://www.swyx.com/support/ssdb.html?kbid=kb2218 The Connection object provides an open method which takes your connect string as parameter. The open method of the RecordSet object takes as second parameter the Connection object. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.