i have finished already creating database and table but i dont know exactly where to paste image path in a DB TABLE
Printable View
i have finished already creating database and table but i dont know exactly where to paste image path in a DB TABLE
If it is a path then all it is is text so you just put it in a text field doesn't matter where in the record just needs to accept text and be long enough to hold whatever the path is.
When I did VB6 I stored the "path" in a config table if the images were on disk. You do not need to store the path on each image filename (if they are in fact all stored in the same folder).
Now that I do web app's the "path" is stored in a web.config file on the web server.
How many and how small are these images?
text field where in a table
not many just about 5 or 6 images and how to configure table, by the way all the images are on a same folder
If you have that few you should consider putting them in a table in your database.
If you are running MS SQL Server here that is running as a service on another server. If this is a multi-user system each user is going to need access to whatever share you put the images on.
If you put them in the DB in a table you can get them the same way you get a SELECT result of regular data. No extra permissions and access problems getting to the images.
Just something to consider.
Hmmm, if we're truly just talking about 5 or 6 images that are used by a program, I'd probably stuff them into the resources file as custom resources, compile them into the executable, and then extract them possibly into "C:\Users\TheUser\AppData\Local\Temp" when I needed them (checking to see if they were still there from the last time I extracted them). Of course, I'd use the Windows GetTempPathW API call to get the temp folder.
Alternatively, I'd stuff the entire images into my database, as suggested above.
If you're packaging the images with the VB6 Package & Deploy Wizard, you can possibly just use App.Path to find them.
Just the ideas that come to me,
Elroy
thank you for kindest reply, but i am running ms access.
Well, ok, I assume that means you're using Macros from within MS-Access to do your work. In that event, you're really in the wrong forum. You should be either here or here.
However, if you're just using an Access MDB or ACCDB file, you could get the path of that file with the database "Connect" property. Even if you're just using MS-Access's VBA to attach to a SQL server, you could still open the MS-Access database and use the "Connect" property to find its location, and then save your pictures there.
Alternatively, you could still stuff them into the MDB or ACCDB file, and extract them when you needed them. It's been awhile since I've stuffed pictures into a database, by I have done it in the past, and it's not difficult. However, if it were me, I'd check in those other forums for your answers.
All The Best,
Elroy
EDIT1: Also, the title of your thread has "via vb6" in it. What does this mean? Are you using MS-Access or are you running VB6?
Im clueless regarding The Package and Development Wizard....baffled here...do i have to store the image path on the Description box or something..and about the Load Behavior...what is it for?
What do you mean where in table?
You would store it in the text field you planned to store it in.
You say you finished creating the database and if that is true then that means you have created a field that you planned to hold the path and/or filename in. That is where you would put it. If you have not created a field to hold this data then you have not finished creating your database.
In other words it is up to you where you put it.