| |
|
|
Thomas Zielinski | Hello people, i sit straight on Dietmars trouble and at rumspielen tells me Profan the The Memory-Variable Test# not dimensioniert be, though I tappt im dunkeln eindeutig two Lines drüber dimensioniere. CompileMarkSeparationcls
var sql& = sqlinit(DSN=Firebird;UID=SYSDBA;PWD=masterkey;DBNAME=E:\Data\KURSDB.GDB;)
print sql&
Set(SQLFile, E:\Data\blobausgabe.jpg)
Declare dasbild#, bild$, groesse%, test#
bild$ = E:\Data\Drache.jpg
groesse% = FileSize(bild$)
Dim dasbild#, groesse%+2
Dim test#, groesse%+500 <-----Dimensionieren
BlockRead(bild$, dasbild#, 0, groesse%+1)
test# = INSERT INTO bilder (id, name, bild) VALUES (1, Drachen, + dasbild# + ) <----- nicht mehr dimensioniert
sqlExec test#,1
Dispose test#
Dispose dasbild#
| | | XProfan X4; Win10 x64 Der Kuchen ist eine lüge! | 02/11/09 ▲ |
| |
| | | | | | | |
| | RGH | Hi,
The Error Message is in the doing something misleading, but the small Program contains some far gröbere Error: CompileMarkSeparation two Listviews the effect? the Result one SQLEXEC-Befehles is always one Text! CompileMarkSeparation 1. of/ one Memory-Variables can no String allocated go. 2. String + Bereichvariable + String functions naturally neither. but Why there here none Error? here proposes The automatic Typumwandlung 2 time To: 1. with String + area + String becomes The address the Memory-Variables automatically by Str$ in a String transformed. behind the = standing So one String. 2. The Memory-Variable can Yes thoroughly one numerischer worth as new address allocated go, means becomes the expression behind the = as numerischer expression interprets. The Stringt becomes therefore automatically intern with VAL in a worth transformed and yields then exakt 0. an Memory-Variable with the ungültigen address 0 counts as not dimensioniert. The Error Message is means letztlich correctly. by the incorrect Programmlogik becomes Test# objectively to a undimensionierten Memory-Variables. CompileMarkSeparation sqlExec expects a String as Parameter and no Memory-Variable!
Folgede Tipps: 1. the loaded Image wen Encode64() in a String transfiguring. dasBild# -> dasBild$ 2. Test# therefore through Test$ supplant and dasBild$ insert 3 to that Reading the Bildes: the SQL-Result is a String. Diesen with Decode64() again in a area transfiguring and as JPG Save.
the here as (ungetestete) Why stay: (I have here no FireBird) CompileMarkSeparationcls
var sql& = sqlinit(DSN=Firebird;UID=SYSDBA;PWD=masterkey;DBNAME=E:\Data\KURSDB.GDB;)
print sql&
Declare dasBild#, dasBild$, bild$, groesse%, test$
bild$ = E:\Data\Drache.jpg
groesse% = FileSize(bild$)
Dim dasbild#, groesse% + 2
BlockRead(bild$, dasbild#, 0, groesse% + 1)
dasBild$ = Encode64(dasBild#, 0, sizeOf(dasBild#))
test$ = INSERT INTO bilder (id, name, bild) VALUES (1, Drachen, + dasbild$ + )
sqlExec test$, 1
Dispose dasbild#
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 02/11/09 ▲ | |
| |
| | Thomas Zielinski | I schieb the now simply time on my flu and the fever. I thanks you gruß Thomas |
| | | XProfan X4; Win10 x64 Der Kuchen ist eine lüge! | 02/11/09 ▲ |
| |
| | Dietmar Horn | Thomas Zielinski
... i sit straight on Dietmars trouble ...
The lane over the Save of/ one File as String (Encode64) into VARCHAR is of my opinion after a Holzweg, the not further chasing go need. into VARCHAR-area fit with IB/FB maximum 32 KB data - means is this already of therefore not to that Save beliebiger Files suitable, because these mostly integral larger are (PDF, JPG, MP3, MPEG, AVI, ...).
In one BLOB-area against it is not File yourself stored, separate only one Verweis hereon, where very in the data base The File stored is. Related [...]
It's all right means therefore, with irgendeinem SQL-INSERT-commands (o.ä.) this Verweis (and evtl. further indicated, How Filesize, etc.?) in the BLOB somehow unterzukriegen. and very on this place missing me for yet unfortunately one Piece film.
the Rauskrümeln the Files from the data base might then backward presumably not any more too bad his, as they first times without Schäden into DB reingeschubst been are.
still how does that Reinschubsen the Files The BLOBs?
meanwhile dreams I atnight already soon of BLOBs ... in the dream see these BLOB-Kreaturen really Real furchterregend from ...
Greeting Dietmar |
| | | Multimedia für Jugendliche und junge Erwachsene - MMJ Hoyerswerda e.V. [...] Windows 95 bis Windows 7 Profan² 6.6 bis XProfan X2 mit XPSE Das große XProfan-Lehrbuch: [...] | 02/14/09 ▲ |
| |
| | | | | | | |
| | Dietmar Horn | I were really sooner on fachliche Answer to that BLOB-trouble (IB/FB involved) and less on bunte Klicki-Bilderchen to evtl. explanation / explanation of my nocturnal BLOB-dreams ...
Greeting Dietmar |
| | | Multimedia für Jugendliche und junge Erwachsene - MMJ Hoyerswerda e.V. [...] Windows 95 bis Windows 7 Profan² 6.6 bis XProfan X2 mit XPSE Das große XProfan-Lehrbuch: [...] | 02/14/09 ▲ |
| |
| | | wished only show, whom film Gibts already. (already long)
@Fachlich: what expect You of me? |
| | | | |
| | Dietmar Horn | iF
@Fachlich: what expect You of me?
currently:
Help, suggestions, Support in direction SQL with Interbase/Firebird, u.ä. - under no circumstance however kauderwelsche Formulierungen, or a collection Date-Bilderchen for pubertierende children / adolescent ...
Greeting Dietmar |
| | | Multimedia für Jugendliche und junge Erwachsene - MMJ Hoyerswerda e.V. [...] Windows 95 bis Windows 7 Profan² 6.6 bis XProfan X2 mit XPSE Das große XProfan-Lehrbuch: [...] | 02/14/09 ▲ |
| |
| | | Dietmar horn
iF @Fachlich: what expect You of me?
under no circumstance however kauderwelsche Formulierungen, or a collection Date-Bilderchen for pubertierende children / adolescent ... Greeting Dietmar
somehow have You no plan of it, what really helps! |
| | | | |
| | | Dietmar, you are sure not alone with your trouble. on the Herstellerseite there a interessanten item, How one VERSCHIEDENE BLOB-ARTEN in Firebird To treat has. integrally under too with Examples: [...] Perhaps bring Yes the moreover. greeting, woodpecker |
| | | | |
|
AnswerThemeninformationenthis Topic has 5 subscriber: |