![]() |
Datenbank: Firebird • Version: 1.5 • Zugriff über: FIBPlus
BDE -> FIBPlus, Blob-Problem
Hallo #,
folgender BDE-Code schreibt einen Text-Blob. Unter FIBPlus klappt das nicht ;( Er findet AsBlob nicht. OK, es geht über CreateBlobStream, aber wie schreibe ich da nen String rein ? OK2, unter folgendem Link habe ich das gefunden, aber ist das das gleiche ? ![]()
Delphi-Quellcode:
Heiko
function UpdateTextBlobField_Ex(const theTableName: String;
const thePrimaryKeyName: String; thePrimaryKeyValue: Integer; const theFieldName: String; const theText: String; var theErrorStr: String): Boolean; var FQuerySQL : TjifQuery; // TQuery Param : TParam; Stream : TStream; begin Result := False; theErrorStr := S_internal_error; try FQuerySQL := CreatejifQuery; try with FQuerySQL do begin DataBaseName:= C_ALIASNAME; SQL.Add('Update '+theTableName+' Set '); SQL.Add(theFieldName+'=:'+theFieldName); SQL.Add('Where '+thePrimaryKeyName+'=:Id'); ParamByName('Id').AsInteger:= thePrimaryKeyValue; Param:= ParamByName(theFieldName); if theText='' then begin Param.DataType:= ftBlob; Param.Clear; Param.Bound:= True; end else begin Param.AsBlob:= theText; end; ExecSQL; end; { with FQuerySQL do } Result:= True; finally FQuerySQL.Free; end; except on E: Exception do theErrorStr:= E.message; end; end; { UpdateTextBlobField_Ex } |
Re: BDE -> FIBPlus, Blob-Problem
Zitat:
Textblobs funktionieren bei mir ganz normal mit ".AsString". z.B. myFibQuery.ParamByName('MyTextBlob').asString := MyTMemo.text; |
Re: BDE -> FIBPlus, Blob-Problem
Hallo,
probier ich aus, zur Zeit kompiliert er noch gar nicht ;( (liegt aber an mir) Danke Heiko |
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:02 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz