Page 1 of 1
Problem With UniConnectDialog
Posted: Fri 31 May 2013 11:23
by mmx110
Hi and Good Time!
I want to ask a question about UniConnectDialog...
when I set StoreLogInfo to False and Try To Execute Dialog and change the serevername after the pushing conect button rise an error rises again with the name of "Last Server". How I can Clear Old Server Name Value and set the New Server Name across the UniConnectDialog select combobox?
Re: Problem With UniConnectDialog
Posted: Fri 31 May 2013 13:38
by AlexP
Hello,
The StoreLogInfo property doesn't affect a server to be connected, this property is responsible for storing successful connection parameters to the registry. Try setting the UniConnectDialog1.UseServerHistory property to False and connecting to the server once more.
Re: Problem With UniConnectDialog
Posted: Fri 31 May 2013 14:35
by mmx110
thanks for reply Alex!
I Wrote the code:
UniConnectDialog1.UseServerHistory:=False;
but I Got This Error when changing database Name:
"Multiple-Step OLE DB Operation generated errors. Check each OLE DB Status value,if available.No work was Done."
Re: Problem With UniConnectDialog
Posted: Mon 03 Jun 2013 08:17
by AndreyZ
I cannot reproduce this problem. Please specify the following:
- the exact version of UniDAC. You can learn it from the About sheet of TUniConnection Editor;
- the exact version of your IDE;
- the exact version of SQL Server server and client. You can learn it from the Info sheet of TUniConnection Editor.
Also, you can try using the latest UniDAC version 5.0.1 and check if the problem persists.
Re: Problem With UniConnectDialog
Posted: Wed 05 Jun 2013 16:14
by mmx110
1- UniDac Version 4.0.2
2- IDE is Delphi 7
3- SQLServer is 2008 R2
Many Kind of you if show me exact sample Code for this situation
Regards
Re: Problem With UniConnectDialog
Posted: Thu 06 Jun 2013 08:56
by AndreyZ
Unfortunately, I still cannot reproduce the problem. Please try the following:
- open Delphi 7;
- create a new application;
- drop the TUniConnection, TUniConnectDialog, TSQLServerUniProvider, and TButton component;
- double click on Button1 and write the following code:
Code: Select all
UniConnection1.ConnectDialog := UniConnectDialog1;
UniConnection1.Open;
- run the application and click Button1;
- choose the "SQL Server" provider from the Provider drop-down list;
- input the correct user name and password to the User Name and Password text boxes;
- choose your server from the Server drop-down list;
- choose your database from the Database drop-down list;
- click the Connect button.
Do you encounter any problems using such approach?
Re: Problem With UniConnectDialog
Posted: Thu 06 Jun 2013 14:12
by mmx110
Dear Andrey Thanks for your attention!
I wrote a code in DataModule OnCreat Event as Bellow:
UniConnectDialog1.UseServerHistory:=False;
UniConnection1.Connected:=True;
SystemUserQuery.Open;
AccNameQuery.Open;
CodingQuery.Open;
AccYearQuery.Open;
CodingQuery.Open;
and I assigned a Database Name From SQLServer to UniConnection By Default
in normal situation Every thing is oK!
but I want write a code for OnConection Lost or OnError Event
For time that Default Dtabase Dose not Found Or Have Error in Connection.
I Wote UniConnection1.OnError Some code as bellow:
try
begin
UniConnection1.Disconnect;
UniConnectDialog1.UseServerHistory:=False;
UniConnectDialog1.Execute;
UniConnection1.Connect;
end;
except on E: Exception do
begin
ShowMessage(E.ClassName+' Error in Conection With Database : '+E.Message);
if Not(UniConnectDialog1.Execute) then Application.Terminate;
end;
end;
SO Application show me that Error when I manually change Database state to offline.
and can not to select other server or related database with different name
on UniConnectDialog.
Re: Problem With UniConnectDialog
Posted: Fri 07 Jun 2013 09:08
by AndreyZ
Thank you for the information. We have reproduced the problem and the investigation of the problem is in progress. We will notify you when we have any results.
Re: Problem With UniConnectDialog
Posted: Wed 10 Jul 2013 12:17
by AndreyZ
We have fixed this problem. This fix will be included in the next UniDAC build.