Pictures inside a database
Page 1: Working with BLOBs. Storing pictures in Access.
These days developing database applications requires more than just operating with textual or numeric data. If you are, for example, developing an Internet/intranet or multimedia based application, frequently there is a need to display pictures along with text from a database.
In this third chapter of the Delphi database course, we'll see how to pull out and display the graphical data (images) inside an Access database with ADO. Don't be worried with the fact that working with images inside an Access database requires more database programming skills than this course has provided so far. Let's pretend that we know more to get more.
If you have followed this course from the beginning (specially the second chapter), you know how to connect to a database and display the Applications (from our working aboutdelphi.mdb database) table in a DBGrid. Remember, we used 3 data components: DBGrid, ADOTable and DataSource to get and display the data from the Applications table.
Back in the first chapter when we created our database, the last filed in the Applications table was left blank (after filling our database with some dummy data). The last field has the name Picture and is of the OLE object type.
http://delphi.about.com/od/database/l/aa030601a.htm
--- I do think use RTTI will be the solution for all picture formats we supported in Delphi.(or use extended library).
These days developing database applications requires more than just operating with textual or numeric data. If you are, for example, developing an Internet/intranet or multimedia based application, frequently there is a need to display pictures along with text from a database.
In this third chapter of the Delphi database course, we'll see how to pull out and display the graphical data (images) inside an Access database with ADO. Don't be worried with the fact that working with images inside an Access database requires more database programming skills than this course has provided so far. Let's pretend that we know more to get more.
If you have followed this course from the beginning (specially the second chapter), you know how to connect to a database and display the Applications (from our working aboutdelphi.mdb database) table in a DBGrid. Remember, we used 3 data components: DBGrid, ADOTable and DataSource to get and display the data from the Applications table.
Back in the first chapter when we created our database, the last filed in the Applications table was left blank (after filling our database with some dummy data). The last field has the name Picture and is of the OLE object type.
http://delphi.about.com/od/database/l/aa030601a.htm
--- I do think use RTTI will be the solution for all picture formats we supported in Delphi.(or use extended library).
标签: Delphi

0 条评论:
发表评论
<< 主页