Hello,
I wanted to secure and acquire data from the SQL database using the code I have written in CRM 4.0, but it comes up with an error. I allowed the data connection through disabling the firewall, but got the same result. Here is the code that I have written. Please make any comments about the codes. Could someone analyze this for me?
functionUpdateCustomerName()
{
var connection = new ActiveXObject("ADODB.Connection") ;
varconnectionstring="Data Source=SVT-SRV-02;Initial Catalog=SynovergeTest_MSCRM;Integrated Security=True;Provider=SQLOLEDB";
try{
connection.Open(connectionstring);
}
catch
varrs = new ActiveXObject("ADODB.Recordset");
rs.Open("SELECT distinct top 1 ModifiedOn,CustomerIdName FROM Opportunity where StatusCode='3' and DeletionStateCode = '0' order by ModifiedOn DESC", connection);
rs.MoveFirst;
while(!rs.eof)
{
alert(rs.fields(0));
rs.movenext;
}
rs.close;
connection.close;
}
Upon executing the codes, the screenshot below appeared.

Is this referring to the setting I made? What should I do?
Waiting for your views.
Thanks in advance.
- Login or Signup Now to post comments

Hallo Donald,
The code you have written may not be having issues, but the error you are getting may be result from issues with your browser settings. You'll therefore need to check your browser if you have any proxy settings that may be causing the issue and remove them.
Hope this helps.
Regards,
Carl