Error seen while acquiring data from the SQL database
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.
Message from webpage
There was an error with this fields customized event.
Field:window
Event:onload
Error.Safety settings on this computer prohibit accessing a data source on another domain.
OK
Is this referring to the setting I made? What should I do?
Waiting for your views.
Thanks in advance.