428 |
|
|
429 |
|
resourcestring |
430 |
|
sTerminatorUnknownState = 'Statement Terminator in unexpected state (%d)'; |
431 |
– |
sUnterminatedString = 'Unterminated string'; |
432 |
– |
sUnknownSymbol = 'Unknown Symbol %d'; |
431 |
|
sNoSelectSQL = 'Select SQL Statements are not supported'; |
432 |
|
sStackUnderflow = 'Stack Underflow'; |
433 |
|
sNoParamQueries = 'Parameterised Queries are not supported'; |
434 |
|
sStackOverFlow = 'Stack Overflow'; |
435 |
|
sResolveQueryParam = 'Resolving Query Parameter: %s'; |
438 |
– |
sNoCommit = 'Commit not allowed here'; |
439 |
– |
sNoReconnect = 'Reconnect not allowed here'; |
436 |
|
sXMLStackUnderflow = 'XML Stack Underflow'; |
437 |
|
sInvalidEndTag = 'XML End Tag Mismatch - %s'; |
438 |
|
sXMLStackOverFlow = 'XML Stack Overflow'; |
562 |
|
end; |
563 |
|
|
564 |
|
procedure TCustomIBXScript.DoReconnect; |
565 |
+ |
var LoginPrompt: boolean; |
566 |
|
begin |
567 |
|
with GetTransaction do |
568 |
|
if InTransaction then Commit; |
569 |
+ |
LoginPrompt := Database.LoginPrompt; |
570 |
+ |
Database.LoginPrompt := false; |
571 |
|
Database.Connected := false; |
572 |
|
Database.Connected := true; |
573 |
+ |
Database.LoginPrompt := LoginPrompt; |
574 |
|
GetTransaction.Active := true; |
575 |
|
end; |
576 |
|
|
577 |
|
procedure TCustomIBXScript.ExecSQL(stmt: string); |
578 |
|
var DDL: boolean; |
579 |
|
I: integer; |
580 |
– |
stats: TPerfCounters; |
580 |
|
begin |
581 |
|
Database.Connected := true; |
582 |
|
FISQL.SQL.Text := stmt; |
655 |
|
FDatabase := AValue; |
656 |
|
FISQL.Database := AValue; |
657 |
|
FIBXMLProcessor.Database := AValue; |
658 |
+ |
FInternalTransaction.Active := false; |
659 |
|
FInternalTransaction.DefaultDatabase := AValue; |
660 |
|
end; |
661 |
|
|
849 |
|
param: string; |
850 |
|
Terminator: char; |
851 |
|
FileName: string; |
852 |
+ |
DBConnected: boolean; |
853 |
+ |
LoginPrompt: boolean; |
854 |
|
begin |
855 |
|
Result := false; |
856 |
|
ucStmt := AnsiUpperCase(stmt); |
968 |
|
begin |
969 |
|
if Database.Attachment.CharSetName2CharSetID(param,charsetid) then |
970 |
|
begin |
971 |
+ |
DBConnected := Database.Connected; |
972 |
+ |
LoginPrompt := Database.LoginPrompt; |
973 |
+ |
Database.LoginPrompt := false; |
974 |
+ |
Database.Connected := false; |
975 |
|
Database.Params.Values['lc_ctype'] := param; |
976 |
< |
if Database.Connected then |
977 |
< |
DoReconnect; |
976 |
> |
Database.Connected := DBConnected; |
977 |
> |
Database.LoginPrompt := LoginPrompt; |
978 |
|
end |
979 |
|
else |
980 |
|
raise Exception.CreateFmt(sInvalidCharacterSet, [param,stmt]); |