No of visitors who read this post: 221
Category: MS SQL Server
Type: Question
No votes yet

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.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

#

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.

  • 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