How do I insert a Image file into a field, of image type? There is no insert button as in Access ???
Microsoft SQL Server
Last Comment
Computer101
8/22/2022 - Mon
Guy Hengel [angelIII / a3]
Access is both a (small) database + a GUI development application.
SQL Server is ONLY a (full-blown) database product, and doesn't have a true user GUI, EM and QA are only Developer & Admin tools.
If you want to insert pictures into a image column, you either need to develop an application that can do this via code, or eventually play around with the TextCopy.exe, which can read a file into a IMAGE or TEXT column.
CHeers
lschweer
Hi narfk1,
angel is right. You can't insert images directly into the SQL Server using the Enterprisemanager.
But you still can use ADO to insert the File. Use the AppendChunk and GetChunk methods of a field. Do the following steps
1.) open recordset
2.) open file and copy to membuffer (you can do that from the file directly as well)
3.) call the append chunk methods for the image field until your file is insterted
4.) Update the record
It's recommended that you should not store an image directly in SQL Server. Although this can be done (e.g. using IMAGE datatype), it's best to only store the path to the image file in the database. Then, when your front-end application queries the database, it retrieves the file path of the image, and then goes there to open it for display.
Angelll I tried using the textcopy.exe program to insert a picture into the database, but it doesn't seem to work. Sorry but Im new to database, but maybe im not inputting the right commands. What would I input when the program asks me to Type the Where clause: ? I only have three column in the Table called PICTURE. 1) ID 2)Person 3)Pict
so would i put the select * FROM PICTURE WHERE ID = '1' or something of that nature??
CleanupPing
narfk1:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
monosodiumg
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:
PAQ with points refunded
Any objections should be posted here in the next 4 days. After that time, the question will be closed.
SQL Server is ONLY a (full-blown) database product, and doesn't have a true user GUI, EM and QA are only Developer & Admin tools.
If you want to insert pictures into a image column, you either need to develop an application that can do this via code, or eventually play around with the TextCopy.exe, which can read a file into a IMAGE or TEXT column.
CHeers