60 |
|
{ } |
61 |
|
{************************************************************************} |
62 |
|
unit FBMessages; |
63 |
+ |
{$IFDEF MSWINDOWS} |
64 |
+ |
{$DEFINE WINDOWS} |
65 |
+ |
{$ENDIF} |
66 |
|
|
67 |
|
{$IFDEF FPC} |
68 |
< |
{$mode objfpc}{$H+} |
68 |
> |
{$mode delphi} |
69 |
|
{$codepage UTF8} |
70 |
|
{$ENDIF} |
71 |
|
|
240 |
|
ibxeInvalidParamCount, |
241 |
|
ibxeInvalidVariantType, |
242 |
|
ibxeServiceRunning, |
243 |
< |
ibxeUniqueRelationReqd |
243 |
> |
ibxeUniqueRelationReqd, |
244 |
> |
ibxeInterfaceNotSupported, |
245 |
> |
ibxeCharacterSetExists, |
246 |
> |
ibxeUnknownUserCharSet, |
247 |
> |
ibxeUninitializedInputParameter, |
248 |
> |
ibxeNegativeGenerator, |
249 |
> |
ibxeServiceUnavailable, |
250 |
> |
ibxeBadConnectString, |
251 |
> |
ibxeServiceNotStarted, |
252 |
> |
ibxeNotRequiredDataSetSource, |
253 |
> |
ibxeNoLimboTransactionInsert, |
254 |
> |
ibxeDatabaseNotConnected, |
255 |
> |
ibxeMultiThreadRequired, |
256 |
> |
ibxeODSVersionRequired, |
257 |
> |
ibxeTokenQueueOverflow, |
258 |
> |
ibxeTokenQueueUnderflow, |
259 |
> |
ibxErrorParsing, |
260 |
> |
ibxeDLInfoError, |
261 |
> |
ibxeDifferentAPIs |
262 |
|
); |
263 |
|
|
264 |
< |
function GetErrorMessage(ErrMess: TIBClientError): string; |
264 |
> |
function GetErrorMessage(ErrMess: TIBClientError): AnsiString; |
265 |
|
|
266 |
|
resourcestring |
267 |
|
{ generic strings used in code } |
281 |
|
SDefaultTransaction = '%s, Default'; |
282 |
|
SFirebirdAPIFuncNotFound = 'Unable to load Firebird Client Library Function "%s"'; |
283 |
|
SDatabaseFilter = 'Database Files (*.fdb; *.gdb)|*.gdb; *.fdb|All files (*.*)|*.*'; |
284 |
+ |
{$IFDEF WINDOWS} |
285 |
+ |
SLibraryNameFilter = 'DLLs (*.dll)|*.dll|All files (*.*)|*.*'; |
286 |
+ |
{$ELSE} |
287 |
+ |
SLibraryNameFilter = 'All files (*.*)|*.*'; |
288 |
+ |
{$ENDIF} |
289 |
|
STrue = 'true'; |
290 |
|
SFalse = 'false'; |
291 |
|
SArray = '(array)'; |
399 |
|
SServerNameMissing = 'Server Name Missing'; |
400 |
|
SQueryParamsError = 'Query Parameters missing or incorrect'; |
401 |
|
SStartParamsError = 'start Parameters missing or incorrect'; |
402 |
< |
SOutputParsingError = 'Unexpected Output buffer value (%d)'; |
402 |
> |
SOutputParsingError = 'Unexpected Output buffer value (%d) - %s'; |
403 |
|
SUseSpecificProcedures = 'Generic ServiceStart not applicable: Use Specific Procedures to set configuration params'; |
404 |
|
SSQLMonitorAlreadyPresent = 'SQL Monitor Instance is already present'; |
405 |
|
SDelphiException = 'DelphiException %s'; |
459 |
|
SInvalidVariantType = 'Invalid variant type'; |
460 |
|
SServiceRunning = 'Cannot start a new service while an existing service is running'; |
461 |
|
SUniqueRelationReqd = 'All Output Fields must derived from the same table'; |
462 |
+ |
SInterfaceNotSupported = 'Interface not supported; Guid %s not found'; |
463 |
+ |
SCharacterSetExists = 'Character set "%s" is already defined'; |
464 |
+ |
SUnknownUserCharSet = 'Unknown user character set "%s"'; |
465 |
+ |
SUninitializedInputParameter = 'SQL Param No. %d (%s) is uninitialised'; |
466 |
+ |
SNegativeGenerator = 'A Generator Increment cannot be negative'; |
467 |
+ |
SServiceUnavailable = 'Request Service is not available'; |
468 |
+ |
SBadConnectString = 'Parse Error in Connect String'; |
469 |
+ |
SServiceNotStarted = 'Cannot Query running service until the service has been started'; |
470 |
+ |
SNotRequiredDataSetSource = 'Object of class %s is not a valid dataset source'; |
471 |
+ |
SNoLimboTransactionInsert = 'You cannot add to a Limbo Transaction list'; |
472 |
+ |
SDatabaseNotConnected = 'Cannot connect using an unattached database'; |
473 |
+ |
SMultiThreadRequired = 'Multi-threading required for %s but not enabled. Please recompile with multi-threading support enabled. '+ |
474 |
+ |
'Hint: you probably need to add -dUseCThreads to the Custom Options.'; |
475 |
+ |
SODSVersionRequired = 'This feature requires ODS Version %s or later'; |
476 |
+ |
STokenQueueOverflow = 'Error in SQL Token Analyser - token queue overflow'; |
477 |
+ |
STokenQueueUnderflow = 'Error in SQL Token Analyser - token queue underflow'; |
478 |
+ |
SErrorParsing = 'Error parsing SQL Statement at clause starting with %s'; |
479 |
+ |
SDLInfoError = 'dlinfo returned error - %s'; |
480 |
+ |
SDifferentAPIs = 'All transaction attachments must use the same Firebird Library'; |
481 |
|
|
482 |
|
const |
483 |
|
IBErrorMessages: array[TIBClientError] of string = ( |
640 |
|
SInvalidParamCount, |
641 |
|
SInvalidVariantType, |
642 |
|
SServiceRunning, |
643 |
< |
SUniqueRelationReqd |
643 |
> |
SUniqueRelationReqd, |
644 |
> |
SInterfaceNotSupported, |
645 |
> |
SCharacterSetExists, |
646 |
> |
SUnknownUserCharSet, |
647 |
> |
SUninitializedInputParameter, |
648 |
> |
SNegativeGenerator, |
649 |
> |
SServiceUnavailable, |
650 |
> |
SBadConnectString, |
651 |
> |
SServiceNotStarted, |
652 |
> |
SNotRequiredDataSetSource, |
653 |
> |
SNoLimboTransactionInsert, |
654 |
> |
SDatabaseNotConnected, |
655 |
> |
SMultiThreadRequired, |
656 |
> |
SODSVersionRequired, |
657 |
> |
STokenQueueOverflow, |
658 |
> |
STokenQueueUnderflow, |
659 |
> |
SErrorParsing, |
660 |
> |
SDLInfoError, |
661 |
> |
SDifferentAPIs |
662 |
|
); |
663 |
|
|
664 |
< |
function GetErrorMessage(ErrMess: TIBClientError): string; |
664 |
> |
function GetErrorMessage(ErrMess: TIBClientError): AnsiString; |
665 |
|
begin |
666 |
|
Result := IBErrorMessages[ErrMess]; |
667 |
|
end; |