473,549 Members | 2,682 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving Images to access database

I am trying to save an image to an access database. I am using the following
code as my update syntax. In the example below b is a byte [] array of the
image. All it is putting in the field is Long Binary Data.

UPDATE datapath SET img_fnt = '" + b + "' where path1 = 'xxx';

the column is created as an ole object. any help is appreicated.

Thanks,
bob;
Jul 13 '06 #1
1 1625
Hi,

That will gonna work , you have to use a parameterized query.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Bob Allen" <bo*@greatsummi ts.comwrote in message
news:uY******** ******@TK2MSFTN GP04.phx.gbl...
>I am trying to save an image to an access database. I am using the
following code as my update syntax. In the example below b is a byte []
array of the image. All it is putting in the field is Long Binary Data.

UPDATE datapath SET img_fnt = '" + b + "' where path1 = 'xxx';

the column is created as an ole object. any help is appreicated.

Thanks,
bob;

Jul 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1767
by: TheTenor | last post by:
I have a page with a graphic. I want to be able to define the graphics such that it is not saved when the viewer saves the page to his local drive. I'm trying to avoid having a seperate folder created just for the graphic when the page is saved. The page is an asp page that is used to access a database record. I have the page title convey...
1
1999
by: adolph | last post by:
Using Access2000, I would like to resize an image then save it to a new file with the resized size. I'm taking pictures (JPGs) with my digitial set at 3.2 megs. I've figured out how to get my access program to find the pictures and show them as thumbnails so I can add a description and notes. I then rename and save these pictures to a...
2
1820
by: manning_news | last post by:
Has anyone had a problem with Access 2003 not saving their coding? I've been using 2003 for a couple of months now and just this week noticed that some coding I'd done for a database was not there anymore. I reentered it and didn't have any problems for a couple of days. Today I entered some coding, saved it, opened another database, and when...
4
3277
by: dale zhang | last post by:
Hi, I am trying to save and read an image from MS Access DB based on the following article: http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp Right now, I saved images without any errors. After reading the ole object from db, I saved it to C: as file1.bmp and displayed on the web. But it can not be displayed. After I manually sent...
3
2999
by: Dennis | last post by:
How can I save then retrieve an image from an access Database using VB.Net? -- Dennis in Houston
4
6709
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my code ?? thank you Pedro Leite From Portugal ------------------------------------
9
3818
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web site for a small club I belong to and one of the features I would like to include is the ability to allow users to upload image files. ...
2
1838
by: Marco Pais | last post by:
Hi there. I'm developing a small application that uses Web Services to access database and store data. At some point, I store some images, by inserting the absolute image path into a varchar field (SQL Server 2005). Images themselves are copied to that path on the server. To read the images, I just use this path. However, some...
2
3368
by: RussCRM | last post by:
I want to use a command button, say "cmdDisplayImage" to display/ transfer a captured image from the ezVidCap1 control to an image or OLE box on the same form such as "PhotoPreview" (not sure which one is possible/best...perhaps someone can help me...I'm new at this.) I really don't want to "save" it first. Then, I want another command...
10
7400
by: Nathan Sokalski | last post by:
I am using ASP.NET 2.0, and need to know how to save and use an image that is stored in an SQL Server image datatype. How can I do this using ASP.NET? Thanks.
0
7520
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7450
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7720
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7470
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7809
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1059
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
763
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.