Jump to content

GSE to Write into CDR database


JRoemer

Recommended Posts

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


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


Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.