Re: [C#] File Upload to PostgreSQL

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [C#] File Upload to PostgreSQL
Дата
Msg-id CAKFQuwZdn74KPJJUX1bNmomSr6zebufgExHCFZseVnupqiMf2g@mail.gmail.com
обсуждение исходный текст
Ответ на [C#] File Upload to PostgreSQL  (drunken <manuzi1@hotmail.com>)
Список pgsql-sql
On Wednesday, July 1, 2015, drunken <manuzi1@hotmail.com> wrote:
Hello,

I am Marc from GB.

I have a problem, i cannot upload a file to my PostgreSQL Database.

I don't find the command what I have to use.
I have tried:

fileUpload.PostedFile.SaveAs(....)

Lets say I have the DB on the Server on 8.8.8.8 the DB is called "test" and
the table "upload" has an ID, name, timeupload and file.
The file is a bytea type. Is this correct?
How is the path called?

Best Regards


With bytea you read the content of the file into memory using whatever language you program in and then "insert into upload (file) values (?);" and pass in the content via whatever parameter methods your language uses.

Your language API may provide for attaching an input stream for the parameter.

David J.

В списке pgsql-sql по дате отправления:

Предыдущее
От: drunken
Дата:
Сообщение: [C#] File Upload to PostgreSQL
Следующее
От: John Sherwood
Дата:
Сообщение: PGSQL-Performance mailing list