Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.11.06;
Скачать: CL | DM;

Вниз

Типы данных   Найти похожие ветки 

 
Viper ©   (2005-09-24 15:34) [0]

Нужно в базу в поле Image занести рисунок, как это сделать?
Form1.Table1.FieldByName("Image").?????:=Form2.Image1.Picture.LoadFromFile(OpenPictureDialog1.FileName);
Какой должен быть тип, если при создании таблицы на Paradox я описал ячейку так Image тип G  ?


 
DiamondShark ©   (2005-09-24 16:14) [1]

Почему никто не желает справку читать?

TBlobField.Assign

Description

Use Assign to copy data to the BLOB field. Assign copies the Value of a BLOB field from

• Another BLOB field
• A TStrings object
• A TBitmap object, if the BlobType is ftGraphic or ftTypedBinary
• A TPicture object, if the BlobType is ftGraphic or ftTypedBinary
• Any object that supports TBlobField in its AssignTo method

In the example below, the Assign method is used to copy the bitmap from a TImage component into a BLOB field through its TBlobField field object.

if not (Query1.State in [dsInsert, dsEdit]) then Query1.Insert;
Query1Images.Assign(Image1.Picture.Bitmap);
Query1.Post;


 
Viper ©   (2005-09-24 16:43) [2]

Как это сделать с помощью TTable


 
Prohodil Mimo ©   (2005-09-25 01:57) [3]

Viper ©   (24.09.05 15:34)
Form1.Table1.FieldByName("Image").Value:=Form2.Image1.Picture.LoadFromFile(OpenPictureDialog1.FileName);


я в самом начале так делал, выдавалась ошибка, но при этом картинка попадала в базу. я не разбираясь в причинах закрыл это дело в
Try Except
Всё заработало без ругани.

... а потом я перешёл на Query, чего и другим желаю :о)



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

Текущий архив: 2005.11.06;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.024 c
14-1129204858
Ксардас
2005-10-13 16:00
2005.11.06
Транскрибация предложений


4-1125891553
NightLord
2005-09-05 07:39
2005.11.06
Windows


1-1129270616
Marsel
2005-10-14 10:16
2005.11.06
Подключение библиотек


14-1129200288
syte_ser78
2005-10-13 14:44
2005.11.06
как парвильно печатать с Акробата?


2-1129181270
SnakeAK
2005-10-13 09:27
2005.11.06
Курсор