|
-
Apr 8th, 2017, 09:49 AM
#1
Thread Starter
Junior Member
where to store image path in a database table via vb6
i have finished already creating database and table but i dont know exactly where to paste image path in a DB TABLE
-
Apr 8th, 2017, 11:19 AM
#2
Re: where to store image path in a database table via vb6
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.
-
Apr 8th, 2017, 11:33 AM
#3
Re: where to store image path in a database table via vb6
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?
-
Apr 9th, 2017, 11:09 AM
#4
Thread Starter
Junior Member
Re: where to store image path in a database table via vb6
text field where in a table
-
Apr 9th, 2017, 11:12 AM
#5
Thread Starter
Junior Member
Re: where to store image path in a database table via vb6
not many just about 5 or 6 images and how to configure table, by the way all the images are on a same folder
-
Apr 9th, 2017, 11:33 AM
#6
Re: where to store image path in a database table via vb6
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.
-
Apr 9th, 2017, 12:01 PM
#7
Re: where to store image path in a database table via vb6
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
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Apr 9th, 2017, 12:15 PM
#8
Thread Starter
Junior Member
Re: where to store image path in a database table via vb6
thank you for kindest reply, but i am running ms access.
-
Apr 9th, 2017, 12:34 PM
#9
Re: where to store image path in a database table via vb6
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?
 Originally Posted by Siddhanth
... i am running ms access.
Last edited by Elroy; Apr 9th, 2017 at 12:37 PM.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Apr 9th, 2017, 01:28 PM
#10
Thread Starter
Junior Member
Re: where to store image path in a database table via 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?
-
Apr 9th, 2017, 02:37 PM
#11
Re: where to store image path in a database table via vb6
 Originally Posted by Siddhanth
text field where in a table
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.
-
Apr 9th, 2017, 05:55 PM
#12
Re: where to store image path in a database table via vb6
 Originally Posted by szlamany
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.
This is the approach that I have advocated for the longest period of time. Once you have it in a DB, you automatically get all the access issues sorted.
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Apr 9th, 2017, 08:31 PM
#13
Re: where to store image path in a database table via vb6
 Originally Posted by abhijit
This is the approach that I have advocated for the longest period of time. Once you have it in a DB, you automatically get all the access issues sorted.
There is a lot of truth to this.
For DR - disaster recovery - having the image in the DB makes so much sense.
I always called this the single-suitcase - everything in the same place.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|