mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2026-01-04 18:30:32 +01:00
sqldb: if SQL empty then do not show ok
git-svn-id: trunk@43714 -
This commit is contained in:
parent
3ebfe3f278
commit
346d432f45
@ -67,7 +67,7 @@ type
|
||||
FTransaction:TSQLTransaction;
|
||||
FWordUnderCursor:string;
|
||||
function CheckConnection:boolean;
|
||||
procedure CheckSQLSyntax({%H-}SQL: TStrings; ShowOk: boolean);
|
||||
procedure CheckSQLSyntax({%H-}SQL: TStrings);
|
||||
procedure CleanupDelphiCode;
|
||||
procedure CreateConstant;
|
||||
procedure ShowMetaData;
|
||||
@ -361,8 +361,7 @@ begin
|
||||
CheckSQLSyntax(SQLEditor.Lines,true)
|
||||
end;
|
||||
|
||||
procedure TSQLStringsPropertyEditorDlg.CheckSQLSyntax(SQL: TStrings;
|
||||
ShowOk: boolean);
|
||||
procedure TSQLStringsPropertyEditorDlg.CheckSQLSyntax(SQL: TStrings);
|
||||
Var
|
||||
S : TStream;
|
||||
P : TSQLParser;
|
||||
@ -374,6 +373,8 @@ begin
|
||||
try
|
||||
SQL.SaveToStream(S);
|
||||
S.Position:=0;
|
||||
if S.Size=0 then
|
||||
exit; // no message for empty input
|
||||
P:=TSQLParser.Create(S);
|
||||
try
|
||||
try
|
||||
@ -386,8 +387,7 @@ begin
|
||||
E:=P.Parse;
|
||||
E.Free;
|
||||
end;
|
||||
if ShowOk then
|
||||
MessageDLG(SSQLOK,SQLSyntaxOK,mtInformation,[mbOK],0);
|
||||
MessageDLG(SSQLOK,SQLSyntaxOK,mtInformation,[mbOK],0);
|
||||
except
|
||||
On E : Exception do
|
||||
begin
|
||||
|
||||
Loading…
Reference in New Issue
Block a user