101 |
|
FSQLData: PByte; {Address of SQL Data in Message Buffer} |
102 |
|
FSQLNullIndicator: PShort; {Address of null indicator} |
103 |
|
FDataLength: integer; |
104 |
+ |
FMetadataSize: integer; |
105 |
|
FNullable: boolean; |
106 |
|
FScale: integer; |
107 |
|
FCharSetID: cardinal; |
118 |
|
function GetScale: integer; override; |
119 |
|
function GetCharSetID: cardinal; override; |
120 |
|
function GetCodePage: TSystemCodePage; override; |
121 |
+ |
function GetCharSetWidth: integer; override; |
122 |
|
function GetIsNull: Boolean; override; |
123 |
|
function GetIsNullable: boolean; override; |
124 |
|
function GetSQLData: PByte; override; |
125 |
|
function GetDataLength: cardinal; override; |
126 |
+ |
function GetSize: cardinal; override; |
127 |
|
procedure SetIsNull(Value: Boolean); override; |
128 |
|
procedure SetIsNullable(Value: Boolean); override; |
129 |
|
procedure SetSQLData(AValue: PByte; len: cardinal); override; |
259 |
|
constructor Create(Attachment: TFB30Attachment; Transaction: ITransaction; |
260 |
|
sql: AnsiString; aSQLDialect: integer); |
261 |
|
constructor CreateWithParameterNames(Attachment: TFB30Attachment; Transaction: ITransaction; |
262 |
< |
sql: AnsiString; aSQLDialect: integer; GenerateParamNames: boolean =false); |
262 |
> |
sql: AnsiString; aSQLDialect: integer; GenerateParamNames: boolean =false; |
263 |
> |
CaseSensitiveParams: boolean=false); |
264 |
|
destructor Destroy; override; |
265 |
|
function FetchNext: boolean; |
266 |
|
property StatementIntf: Firebird.IStatement read FStatementIntf; |
362 |
|
CharSetID2CodePage(GetCharSetID,result); |
363 |
|
end; |
364 |
|
|
365 |
+ |
function TIBXSQLVAR.GetCharSetWidth: integer; |
366 |
+ |
begin |
367 |
+ |
result := 1; |
368 |
+ |
with Statement.GetAttachment DO |
369 |
+ |
CharSetWidth(GetCharSetID,result); |
370 |
+ |
end; |
371 |
+ |
|
372 |
|
function TIBXSQLVAR.GetIsNull: Boolean; |
373 |
|
begin |
374 |
|
Result := IsNullable and (FSQLNullIndicator^ = -1); |
389 |
|
Result := FDataLength; |
390 |
|
end; |
391 |
|
|
392 |
+ |
function TIBXSQLVAR.GetSize: cardinal; |
393 |
+ |
begin |
394 |
+ |
Result := FMetadataSize; |
395 |
+ |
end; |
396 |
+ |
|
397 |
|
function TIBXSQLVAR.GetArrayMetaData: IArrayMetaData; |
398 |
|
begin |
399 |
|
if GetSQLType <> SQL_ARRAY then |
752 |
|
else |
753 |
|
FSQLSubType := 0; |
754 |
|
FDataLength := aMetaData.getLength(StatusIntf,i); |
755 |
+ |
FMetadataSize := FDataLength; |
756 |
|
Check4DataBaseError; |
757 |
|
case SQLType of |
758 |
|
SQL_TEXT, SQL_TYPE_DATE, SQL_TYPE_TIME, SQL_TIMESTAMP, |
759 |
|
SQL_BLOB, SQL_ARRAY, SQL_QUAD, SQL_SHORT, SQL_BOOLEAN, |
760 |
< |
SQL_LONG, SQL_INT64, SQL_DOUBLE, SQL_FLOAT, SQL_D_FLOAT: |
760 |
> |
SQL_LONG, SQL_INT64, SQL_INT128, SQL_DOUBLE, SQL_FLOAT, SQL_D_FLOAT, |
761 |
> |
SQL_TIMESTAMP_TZ, SQL_TIME_TZ, SQL_DEC_FIXED, SQL_DEC16, SQL_DEC34, |
762 |
> |
SQL_TIMESTAMP_TZ_EX, SQL_TIME_TZ_EX: |
763 |
|
begin |
764 |
|
if (FDataLength = 0) then |
765 |
|
{ Make sure you get a valid pointer anyway |
842 |
|
Check4DataBaseError; |
843 |
|
FDataLength := aMetaData.getLength(StatusIntf,i); |
844 |
|
Check4DataBaseError; |
845 |
+ |
FMetadataSize := FDataLength; |
846 |
|
FRelationName := strpas(aMetaData.getRelation(StatusIntf,i)); |
847 |
|
Check4DataBaseError; |
848 |
|
FFieldName := strpas(aMetaData.getField(StatusIntf,i)); |
1081 |
|
if (FStatementIntf <> nil) then |
1082 |
|
FreeHandle; |
1083 |
|
if E is EIBInterBaseError then |
1084 |
< |
raise EIBInterBaseError.Create(EIBInterBaseError(E).SQLCode, |
1085 |
< |
EIBInterBaseError(E).IBErrorCode, |
1066 |
< |
EIBInterBaseError(E).Message + |
1067 |
< |
sSQLErrorSeparator + FSQL) |
1068 |
< |
else |
1069 |
< |
raise; |
1084 |
> |
E.Message := E.Message + sSQLErrorSeparator + FSQL; |
1085 |
> |
raise; |
1086 |
|
end; |
1087 |
|
end; |
1088 |
|
FPrepared := true; |
1287 |
|
|
1288 |
|
constructor TFB30Statement.CreateWithParameterNames( |
1289 |
|
Attachment: TFB30Attachment; Transaction: ITransaction; sql: AnsiString; |
1290 |
< |
aSQLDialect: integer; GenerateParamNames: boolean); |
1290 |
> |
aSQLDialect: integer; GenerateParamNames: boolean; |
1291 |
> |
CaseSensitiveParams: boolean); |
1292 |
|
begin |
1293 |
|
inherited CreateWithParameterNames(Attachment,Transaction,sql,aSQLDialect,GenerateParamNames); |
1294 |
|
FFirebird30ClientAPI := Attachment.Firebird30ClientAPI; |
1295 |
|
FSQLParams := TIBXINPUTSQLDA.Create(self); |
1296 |
+ |
FSQLParams.CaseSensitiveParams := CaseSensitiveParams; |
1297 |
|
FSQLRecord := TIBXOUTPUTSQLDA.Create(self); |
1298 |
|
InternalPrepare; |
1299 |
|
end; |