Error seen while acquiring data from the SQL database

Asked By 30 points N/A Posted on -
qa-featured

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.

SHARE
Answered By 10 points N/A #139238

Error seen while acquiring data from the SQL database

qa-featured

Hello 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.

  • If you're using Firefox, open it and do the following:
  • Go to Tools and then choose Options.
  • In the window that will open, click on the Advanced Tab, and then click on Network.
  • After that click on Settings.
  • After that check the manual configuration checkbox and get rid of any proxy settings in there.
  • Or you can just check the No Proxy checkbox to deactivate the proxy settings.
  • Save changes.

Hope this helps.

Regards,

Carl

 

Related Questions