Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "KOL";
Текущий архив: 2008.06.29;
Скачать: [xml.tar.bz2];

Вниз

Database large object   Найти похожие ветки 

 
Jon ©   (2007-09-24 02:49) [0]

With KOLEdb to get FieldByNameAsHex how can I find the size of the returned data in bytes? (I have image stored or binary data)


 
thaddy   (2007-09-24 03:05) [1]

Use a memorystream and use memorystream.size ;-)


 
Jon ©   (2007-09-24 12:14) [2]

That is what I though but I cannot get the data into the stream.
This is the code that I am trying:

var
 Stream: PStream;
 Blob: Pointer;
 QR: PQuery;
begin
 ...
 Stream := NewMemoryStream;
 try
   Blob := QR.FieldByNameAsHex["picblob"];  // Stream.Write requires var parameter
   Stream.Write(Blob,????);   // Write(var Buffer; Count: DWord)
   Stream.SaveToFile("c:\blob.bin",0,Stream.Size);
 finally
   Stream.Free;
 end;
end;

I think that I am not understanding the technique correctly.
Is there a working example to help me please? Thank you.


 
Vladimir Kladov ©   (2007-09-24 18:09) [3]

I did not implement blobs in KOLEDb. Certainly this may be possible but changing code (may be a lot). It seems that this is not necessary for new DB engines like MS SQL 2000 / XP: there are no more restrictions for varchar field maximum size as earlier.


 
Jon ©   (2007-09-24 18:37) [4]

Thanks - I am glad that it is KOLEDb and not me.

I think that adding blob support would be very useful.

MySQL VARCHAR max length is 255 before MySQL 5.0.3, and 65535 in 5.0.3 and later versions.

I shall try to hack KOLEDb, unless another method is recommended.



Страницы: 1 вся ветка

Форум: "KOL";
Текущий архив: 2008.06.29;
Скачать: [xml.tar.bz2];

Наверх




Память: 0.44 MB
Время: 0.032 c
2-1212406603
kla$1
2008-06-02 15:36
2008.06.29
перезапуск приложения


9-1171446585
Vemer
2007-02-14 12:49
2008.06.29
Какие режимы OpenGl надо включить?


3-1200920739
S@shka
2008-01-21 16:05
2008.06.29
Передать в UDF TimeStamp


15-1210775089
Vlad Oshin
2008-05-14 18:24
2008.06.29
Впервые в команде. Думал, прикалываетесь.


15-1210654618
Slider007
2008-05-13 08:56
2008.06.29
С днем рождения ! 13 мая 2008 вторник





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский