Problem With UniConnectDialog
Problem With UniConnectDialog
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?
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
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.
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
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."
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."
-
AndreyZ
Re: Problem With UniConnectDialog
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.
- 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
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
2- IDE is Delphi 7
3- SQLServer is 2008 R2
Many Kind of you if show me exact sample Code for this situation
Regards
-
AndreyZ
Re: Problem With UniConnectDialog
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:- 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?
- 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;- 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
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.
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.
-
AndreyZ
Re: Problem With UniConnectDialog
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.
-
AndreyZ
Re: Problem With UniConnectDialog
We have fixed this problem. This fix will be included in the next UniDAC build.