|
|
#1 |
|
Fanatic Member
Join Date: Feb 05
Location: Searching ..
Posts: 669
![]() |
how can picture file can be stored in Access Database...
** Don't advice me i) to store path of file ii) it increases OHD iii) Bla Blah ...!!!!
Last edited by vbPoet; Apr 20th, 2005 at 08:53 PM. |
|
|
|
|
|
#2 |
|
PowerPoster
Join Date: Mar 04
Location: New Amsterdam
Posts: 21,118
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Picture in ACCESS
Here is a sample procedure to store image:
VB Code:
__________________
Microsoft MVP - Visual Basic 2006-2010 Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database . Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent . The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array Visual Basic 6.0 On-Line Documentation . Connection Strings |
|
|
|
|
|
#3 |
|
Software Carpenter
Join Date: Feb 05
Location: Philippines
Posts: 9,747
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Picture in ACCESS
__________________
Regards, ™As a gesture of gratitude please consider rating helpful posts. c",) FAQ Submissions: ADO Tutorial | Add record to database | Read/write a text file | Read/write to .Ini | Delete a file | Check file existence | One instance of application | Retrieve running processes / Other stuffs: Mouse Hotkey | Compress file using SQL Server! | Global error handler with stack tracing | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system |
|
|
|
|
|
#4 |
|
Fanatic Member
Join Date: Feb 05
Location: Searching ..
Posts: 669
![]() |
Re: Picture in ACCESS
thx RhinO.
from your code snippet i realise that .. with your same code any file can be stored in database like .exe,.jpg,.swf,.doc because you are first gaining binary access then appending this chunk into database ... M i right ..? |
|
|
|
|
|
#5 |
|
PowerPoster
Join Date: Mar 04
Location: New Amsterdam
Posts: 21,118
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Picture in ACCESS
Absolutely yes!
The only problem is that MS Access is limited to 2GB ... but realistically after databse file reaches 1GB you will notice performance issues so frequently compacting mdb is highly preferable.
__________________
Microsoft MVP - Visual Basic 2006-2010 Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database . Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent . The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array Visual Basic 6.0 On-Line Documentation . Connection Strings |
|
|
|
|
|
#6 | |
|
Fanatic Member
Join Date: Feb 05
Location: Searching ..
Posts: 669
![]() |
Re: Picture in ACCESS
Quote:
thx deU & RhinO it means RhinO if we are using Oracle,mySQL then no Problem ..
|
|
|
|
|
|
|
#7 |
|
PowerPoster
Join Date: Mar 04
Location: New Amsterdam
Posts: 21,118
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Picture in ACCESS
I haven't used it with MySql but Oracle, SQL Server, Sybase are fine.
__________________
Microsoft MVP - Visual Basic 2006-2010 Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database . Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent . The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array Visual Basic 6.0 On-Line Documentation . Connection Strings |
|
|
|
|
|
#8 |
|
Fanatic Member
Join Date: Feb 05
Location: Searching ..
Posts: 669
![]() |
Re: Picture in ACCESS
thx RhinO
but unfortunately i cannot rate your post it says Spread your post any other place ( some thing like that ) |
|
|
|
|
|
#9 |
|
PowerPoster
Join Date: Mar 04
Location: New Amsterdam
Posts: 21,118
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: [Resolved] Picture in ACCESS
As you may already know I have no problem with that what so ever.
Cheers.
__________________
Microsoft MVP - Visual Basic 2006-2010 Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database . Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent . The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array Visual Basic 6.0 On-Line Documentation . Connection Strings |
|
|
|
|
|
#10 |
|
Super Moderator
Join Date: Apr 01
Location: LA, Calif. Raiders #1 AKA:Gangsta Yoda™
Posts: 58,875
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: [Resolved] Picture in ACCESS
Hey RB, what is BLOCK_SIZE defined as? Nice code btw
__________________
VB/Office Guru™ (AKA: Gangsta Yoda™ I dont answer coding questions via PM. Please post a thread in the appropriate forum. ![]() ![]() Microsoft MVP 2006, 2007, 2008, 2009, 2010 Office Development FAQ (VBA, VB 6, VB.NET, C#) Software Engineer MCP (VB 6 & .NET), BSEE, CET If a post has helped you then Please Rate it! • Star Wars Gangsta Rap • Reps & Rating Posts • VS.NET on Vista (New) • Multiple .NET Framework Versions (New) • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility • System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 150 GB HDs RAID 1, 2 GBs DDR2 667 MHz RAM, 3 Viewsonic 17" LCDs, Windows Vista RTM, IE 7, Office 2007 |
|
|
|
|
|
#11 |
|
PowerPoster
Join Date: Mar 04
Location: New Amsterdam
Posts: 21,118
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: [Resolved] Picture in ACCESS
Thanks Rob ... it's near 10K in my app but you may redefine it:
Public Const BLOCK_SIZE = 10000
__________________
Microsoft MVP - Visual Basic 2006-2010 Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database . Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent . The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array Visual Basic 6.0 On-Line Documentation . Connection Strings |
|
|
|
|
|
#12 |
|
Super Moderator
Join Date: Apr 01
Location: LA, Calif. Raiders #1 AKA:Gangsta Yoda™
Posts: 58,875
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: [Resolved] Picture in ACCESS
Oh, its a user defined const. Thanks.
__________________
VB/Office Guru™ (AKA: Gangsta Yoda™ I dont answer coding questions via PM. Please post a thread in the appropriate forum. ![]() ![]() Microsoft MVP 2006, 2007, 2008, 2009, 2010 Office Development FAQ (VBA, VB 6, VB.NET, C#) Software Engineer MCP (VB 6 & .NET), BSEE, CET If a post has helped you then Please Rate it! • Star Wars Gangsta Rap • Reps & Rating Posts • VS.NET on Vista (New) • Multiple .NET Framework Versions (New) • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility • System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 150 GB HDs RAID 1, 2 GBs DDR2 667 MHz RAM, 3 Viewsonic 17" LCDs, Windows Vista RTM, IE 7, Office 2007 |
|
|
|
|
|
#13 |
|
PowerPoster
Join Date: Mar 04
Location: New Amsterdam
Posts: 21,118
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: [Resolved] Picture in ACCESS
No problem.
__________________
Microsoft MVP - Visual Basic 2006-2010 Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database . Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent . The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array Visual Basic 6.0 On-Line Documentation . Connection Strings |
|
|
|
|
|
#14 | |
|
Software Carpenter
Join Date: Feb 05
Location: Philippines
Posts: 9,747
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: [Resolved] Picture in ACCESS
This might have some importance with you....
Quote:
__________________
Regards, ™As a gesture of gratitude please consider rating helpful posts. c",) FAQ Submissions: ADO Tutorial | Add record to database | Read/write a text file | Read/write to .Ini | Delete a file | Check file existence | One instance of application | Retrieve running processes / Other stuffs: Mouse Hotkey | Compress file using SQL Server! | Global error handler with stack tracing | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system |
|
|
|
|
|
|
#15 |
|
Hyperactive Member
Join Date: Aug 00
Location: Montreal
Posts: 442
![]() |
Re: [Resolved] Picture in ACCESS
RhinoBull, since you seem to be a guru in that field, my question is primarily aimed at you .......
I have a PictureBox filled with random colored pixels. SavePicture pic1.Image, "c:\test\test.bmp" worked great. So I can now save test.bmp into a database. But what if I wanted to skip that step, and save the PictureBox *DIRECTLY* into my database... Can that be done? I would appreciate to avoid saving the picture to disk first. Thanks
__________________
Christian (Email/MSN: krass_methot@hotmail.com) |
|
|
|
|
|
#16 | |
|
PowerPoster
Join Date: Mar 04
Location: New Amsterdam
Posts: 21,118
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: [Resolved] Picture in ACCESS
Quote:
__________________
Microsoft MVP - Visual Basic 2006-2010 Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database . Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent . The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array Visual Basic 6.0 On-Line Documentation . Connection Strings |
|
|
|
|
|
|
#17 |
|
Hyperactive Member
Join Date: Aug 00
Location: Montreal
Posts: 442
![]() |
Re: [Resolved] Picture in ACCESS
Oh.. yes. This actually works great. Thanks.
I just usually try to avoid unnecessary steps. Even tho I still believe there *should* be a way, I wouldn't even bother to change my code, at that point. Thank you
__________________
Christian (Email/MSN: krass_methot@hotmail.com) |
|
|
|
|
|
#18 |
|
New Member
Join Date: Jan 07
Posts: 3
![]() |
Re: [Resolved] Picture in ACCESS
RB! do you have any codes that can make commandbutton into xp style without using a user control/class module. API? thanks!
|
|
|
|
|
|
#19 |
|
PowerPoster
Join Date: Mar 04
Location: New Amsterdam
Posts: 21,118
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: [Resolved] Picture in ACCESS
Welcome to Forums, tgcngb!
But how's your question relevant to this thread?
__________________
Microsoft MVP - Visual Basic 2006-2010 Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database . Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent . The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array Visual Basic 6.0 On-Line Documentation . Connection Strings |
|
|
|
|
|
#20 |
|
New Member
Join Date: Jan 07
Posts: 3
![]() |
Re: [Resolved] Picture in ACCESS
sorry. i forgot to think of the topic. but, if you still have something, hope you can share it. thanks!
|
|
|
|
|
|
#21 |
|
PowerPoster
Join Date: Mar 04
Location: New Amsterdam
Posts: 21,118
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: [Resolved] Picture in ACCESS
Try to use the search - it's very handy. Searching this forum for something like "XP styles" will most definitely return you bunch of pages with samples.
__________________
Microsoft MVP - Visual Basic 2006-2010 Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database . Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent . The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array Visual Basic 6.0 On-Line Documentation . Connection Strings |
|
|
|
|
|
#22 |
|
New Member
Join Date: Jan 07
Posts: 3
![]() |
Re: [Resolved] Picture in ACCESS
ok. tnx rb!
|
|
|
|
|
|
#23 |
|
New Member
Join Date: May 07
Posts: 3
![]() |
Re: [Resolved] Picture in ACCESS
Hi guys,
do you know how can i use this code with vb2005? ![]() = RhinoBull's posted - The insertion pictor to database = |
|
|
|
|
|
#24 |
|
PowerPoster
Join Date: Mar 04
Location: New Amsterdam
Posts: 21,118
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: [Resolved] Picture in ACCESS
It's not designed for VB.Net.
__________________
Microsoft MVP - Visual Basic 2006-2010 Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database . Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent . The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array Visual Basic 6.0 On-Line Documentation . Connection Strings |
|
|
|
|
|
#25 |
|
New Member
Join Date: May 07
Posts: 3
![]() |
Re: [Resolved] Picture in ACCESS
Thanks Rhino. But expected similar result, for vb.net, how i write the code?
|
|
|
|
|
|
#26 |
|
Hyperactive Member
Join Date: Jul 07
Location: Malaysia/ Currently at Singapore
Posts: 363
![]() |
Re: [Resolved] Picture in ACCESS
If I want to save the file or image to database
What type of Data Type i should use ? Thanks for advice
__________________
Where there is no hope, there can be no endeavor. There are two ways of rising in the world, either by your own industry or by the folly of others. |
|
|
|
|
|
#27 |
|
Hyperactive Member
Join Date: Aug 00
Location: Montreal
Posts: 442
![]() |
Re: [Resolved] Picture in ACCESS
hey nUflAvOrS..
I use the "OLE Object" data type in my databases to store pictures......
__________________
Christian (Email/MSN: krass_methot@hotmail.com) |
|
|
|
|
|
#28 |
|
PowerPoster
Join Date: Mar 04
Location: New Amsterdam
Posts: 21,118
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: [Resolved] Picture in ACCESS
That would be any type that is compatible with BLOB - different db engines have different naming conventions but some of them identical so you really need to experiment.
__________________
Microsoft MVP - Visual Basic 2006-2010 Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database . Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent . The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array Visual Basic 6.0 On-Line Documentation . Connection Strings |
|
|
|
|
|
#29 |
|
Hyperactive Member
Join Date: Jul 07
Location: Malaysia/ Currently at Singapore
Posts: 363
![]() |
Re: [Resolved] Picture in ACCESS
Thanks Krass and RhinoBull, I will try your method.
If got any problem i will ask the question here again. Thanks !
__________________
Where there is no hope, there can be no endeavor. There are two ways of rising in the world, either by your own industry or by the folly of others. |
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|