473,498 Members | 1,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create datatable with an Image

I need to create a datatable, in code, and put images into it (gifs and
jpg). I use code similar to that below to create the table but I'm not sure
how to get the image into the table....
dim mytable as new datatable
mytable.TableName = "ImageTable"
dim cols as DataColumnCollection
cols = mytable.columns
dim FileName as DataColumn
FileName = cols.Add("FileName", GetType(string))
dim FileImage as DataColumn
FileImage = cols.add("FileImage", GetType(image))

dim myrow as datarow
myrow = mytable.NewRow()
myrow("FileName") = "this is my Pic"
myrow("FileImage") = ..................

if my image is at c:\myPic.jpg, how do I get the image into
myrow("FileImage") ??

thanks,
T
Apr 2 '06 #1
1 6833
Tina,
this should do it...

dim myImage as new system.drawing.bitmap("c:\myPic.jpg")
myrow("FileImage") = myImage

--
Regards,
Gary Blakely
Dean Blakely & Associates
www.deanblakely.com
"Tina" <ti**********@nospammeexcite.com> wrote in message
news:ul**************@tk2msftngp13.phx.gbl...
I need to create a datatable, in code, and put images into it (gifs and
jpg). I use code similar to that below to create the table but I'm not
sure how to get the image into the table....
dim mytable as new datatable
mytable.TableName = "ImageTable"
dim cols as DataColumnCollection
cols = mytable.columns
dim FileName as DataColumn
FileName = cols.Add("FileName", GetType(string))
dim FileImage as DataColumn
FileImage = cols.add("FileImage", GetType(image))

dim myrow as datarow
myrow = mytable.NewRow()
myrow("FileName") = "this is my Pic"
myrow("FileImage") = ..................

if my image is at c:\myPic.jpg, how do I get the image into
myrow("FileImage") ??

thanks,
T

Apr 2 '06 #2

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

Similar topics

3
13866
by: Moth | last post by:
I have a PlotPanel class that extends JPanel which I have used previously to display charts in swing guis. I now want to display a graph in a jsp page so I was going to generate the graph and then...
2
3103
by: Programmer | last post by:
Hi all Here is my problem I want to create an image so i can pass it on an object to put it as watermark in my pdf report Here is what i have write so far Dim objBitmap As...
1
1939
by: news.microsoft.com | last post by:
Hello and first of all thank you for your time. I am currently developing an ASP.net web page, which has data stored in SQL Server. It is a web page for a State Agent and my problem is: I need...
4
1388
by: Steven | last post by:
Hi, I want to create an image that looks exactly the same as the things I see in my application. I have an application in which you can create some controls, drag them anywhere you like. Now I...
2
2290
by: allanon76 | last post by:
I need to create an Image with more then 256 gray scale. this is my code, i've some problem setting correctly the pixel value. any idea? There is another way to create an image with more then...
3
2655
by: christiang | last post by:
Hi guys, I'd like to use Alexia thumbnail service. It's an interesting service, you pass an url to its cgi and you get a thumbnail of that url. Of course they don't have the screenshots of all the...
4
1866
by: Gunnar G | last post by:
Hi. I've created an image with this code Header("Content-Type: image/png"); $image = ImageCreate($W,$H); $white = ImageColorAllocate($image,255,255,255); $black =...
0
2565
by: mayormel | last post by:
Hi! This might be an odd question to ask on this forum but i have no other options. Im good in Adobe Photoshop and created many business card, flyers and so on. Now I need to create an image on PDF...
1
1254
by: kiranvn31 | last post by:
Hi 1) I have images (.png) with transparen backgrounde,which is draw by my designer suppose name of image is Col1.png 2) I also have few images with fabric design. suppose name is...
0
1274
by: kiranvn31 | last post by:
Hi 1) in my project i have two images on image which is draw by my designer suppose name of images is Col1.png and another is fabric image which is downloaded from net suppose name of image is...
0
7124
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,...
0
7163
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,...
0
5460
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4904
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4586
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...
0
3090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
651
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
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...

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.