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

Вниз

Как и в какое поле можно сохранить файл   Найти похожие ветки 

 
Alies   (2006-07-31 09:51) [0]

Мастера скажите!Как и в какое поле можно сохранить в таблицу и извлекать любой бинарный файл (doc, exe, dll и т.д.) в MSSQL.


 
Ega23 ©   (2006-07-31 10:33) [1]

image


 
Ega23 ©   (2006-07-31 10:33) [2]


Binary Data
Binary data consists of hexadecimal numbers. For example, the decimal number 245 is hexadecimal F5. Binary data is stored using the binary, varbinary, and image data types in Microsoft® SQL Server™ 2000. A column assigned the binary data type must have the same fixed length (up to 8 KB) for each row. In a column assigned the varbinary data type, entries can vary in the number of hexadecimal digits (up to 8 KB) they contain. Columns of image data can be used to store variable-length binary data exceeding 8 KB, such as Microsoft Word documents, Microsoft Excel spreadsheets, and images that include bitmaps, Graphics Interchange Format (GIF), and Joint Photographic Experts Group (JPEG) files.

In general, use varbinary for storing binary data, unless the length of the data exceeds 8 KB, in which case you should use image. It is recommended that the defined length of a binary column be no larger than the expected maximum length of the binary data to be stored.



 
Desdechado ©   (2006-07-31 11:29) [3]

BLOB (binary large object)


 
Ega23 ©   (2006-07-31 11:32) [4]


> BLOB (binary large object)


Они разные бывают.


 
Desdechado ©   (2006-07-31 11:34) [5]

Безусловно. Но общее название у них есть.


 
Fay ©   (2006-07-31 13:20) [6]

image


 
Alies   (2006-08-02 09:52) [7]

Как в дельфи будет выглядеть код загрузки файла в базу?


 
Ega23 ©   (2006-08-02 09:56) [8]


> Как в дельфи будет выглядеть код загрузки файла в базу?


Стандартно. Заголовок процедуры (функции, метода), объявление локальных переменных (если надо), begin-end блок.


 
Desdechado ©   (2006-08-02 11:11) [9]

Query1.Sql.Text :=
  "INSERT INTO testblob " +
  " ( " +
  "  fBlob" +
  " )" +
  " VALUES" +
  " (" +
  " :ParamBlobField" +
  ")";
Query1.ParamByName("ParamBlobField").DataType := ftBlob;
Query1.ParamByName("ParamBlobField").ParamType := ptInput;
Query1.ParamByName("ParamBlobField").LoadFromFile("MyFile",ftBlob);
Query1.ExecSql;



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

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

Наверх




Память: 0.48 MB
Время: 0.045 c
3-1153897920
Zouch
2006-07-26 11:12
2006.10.01
Диалог на подключение к БД


15-1157803458
Mike Petrichenko
2006-09-09 16:04
2006.10.01
Плагиат цветет и пахнет!


2-1157949541
Dr. Genius
2006-09-11 08:39
2006.10.01
Аномальные явления в функциях шифрации/дешифрации строк


2-1157723033
random(128)
2006-09-08 17:43
2006.10.01
HashLib! v1.03 и т.д.


2-1157707741
vodvorezlaya
2006-09-08 13:29
2006.10.01
Вопрос по Database Desktop