Page 1 of 1

Unable to Connect in IDE

Posted: Mon 04 Jul 2011 13:46
by Malc123
Hi

I have a problem connecting when running my application through the IDE. If I drop an msconnection on to my form I can open it and browse my sql servers. When I run the application through the IDE the program just errors out and won't connect.
I have put an msconnectDialog on the form when the application is run it will not find a list of the servers. When I drop down the server box I get an error EconvertError with message 'Format '%i' invalid or incompatible with argument.
If I compile the application and run it from the folder outside the IDE all is normal.

No fire wall on.

The odd thing is some applications work correctly

Windows 7 64
Delphi XE
SDAC 5.10.0.7

Posted: Mon 04 Jul 2011 15:41
by AndreyZ
Hello,

Please try the following:
- create a new application;
- drop the TMSConnection and TButton components onto the form;
- add the SdacVcl unit to the USES clause (to enable the default connect dialog);
- write the following code:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  MSConnection1.Open;
end;
- run the application and click the button.
Can you connect this way? Does the error with the server list occur?

Sdac

Posted: Mon 04 Jul 2011 15:53
by Malc123
Thank you

Yes this works creating from new.

I have a small application which I have edited to have the same as your example. When I run it I get the error. If I start a new project and copy the components off the original form to the new project it works. But I cannot go through the main application like this.

This is a completely clean install of windows and Delphi.

Posted: Tue 05 Jul 2011 08:20
by AndreyZ
It seems that the problem is caused by some project options. Please send me your small application that demonstrates the problem to andreyz*devart*com.

Example now sent

Posted: Tue 05 Jul 2011 10:08
by Malc123
I have now sent you an example

Posted: Tue 05 Jul 2011 14:06
by AndreyZ
I've investigated your project. The problem with connecting to SQL Server is caused by the following lines in your project (Project1.dproj):

Code: Select all


  '\cpm-s00\users$\MJL\ShopFloor Delphi XE'
If you remove these lines from the Project1.dproj file, you will be able to connect to SQL Server. This problem isn't caused by SDAC. I've checked ADO components as well, and they showed the same error. For more information about this problem, please contact the Embarcadero support.

Posted: Wed 06 Jul 2011 07:22
by Malc123
Andrey

Brilliant thank you very much. All working now

Posted: Wed 06 Jul 2011 07:40
by AndreyZ
Feel free to contact us if you have any further questions about SDAC.