Visual Studio 2010中的图像数据库 [英] Image database in visual studio 2010

查看:109
本文介绍了Visual Studio 2010中的图像数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使数据库中包含600多个图像(总大小为50-60 mb).
每个图像都有一个名称和15个相关的参数(字符串).我已经制作了一个带有搜索参数的类似数据库(在vb.net中)作为Access数据库,但是它没有图像.
我应该怎么办?
我需要按2个或更多参数搜索数据库,并列出符合这些参数的图像名称,然后仅查看所选图像.然后,我只需要选择一张图像及其参数即可用于进一步的计算和打印.我已经完成了整个过程,但是没有图像.
我知道最好的解决方案是将所有图像放到一个单独的文件中,但是我想避免在其他计算机上使用该程序的问题,因为每台计算机都有指向该文件的不同路径.
是否可以将所有图像放在项目的资源"中?我应该这样避免路径问题吗?也许还有另一种更好的方法?
我没有看完代码,但是我需要专业人士的建议怎么办?
(与Visual Studio 2010有关)
提前谢谢.
Zlatkodo

I need to make database with more then 600 images (total size 50-60 mb).
Each image has a name and 15 associated parameters (strings). A similar database with search parameters (in vb.net) I have already made as an Access database, but it was without images.
What should I do?
I need to search the database by 2 or more parameters, and make a list with names of images that meet these parameters and then view only the selected images. Then I need to select only one image, and its parameters to be used in further calculations and printing. I have the whole process had already done but without the images.
I know that the best solution is, to put all the images into a separate file but I want to avoid the problems with using the program on other computers, because every computer have a different path to this file.
Whether I can put all the images in the "Resource" of my project? Should I avoid problems with path in this way? Perhaps there is another, better way?
I do not look finished code, but I need advice from a professional what should I do?
( It is about Visual Studio 2010)
Thanks in advance.
Zlatkodo

推荐答案

您可以将数据保留在访问数据库文件中并继续使用(就像您已经在做一样.至于图像,我不知道)不知道我是否会将所有这些内容都放在应用程序中作为资源,而是只是创建一个其中包含图像的文件夹,并将该文件夹包含在您的安装项目中,并将其作为子文件夹安装在您的应用程序目录.然后,图像的路径始终相同:

You can leave your data in the access database file and still use it (like you''re already doing. As for the images, I don''t know if I''d put all of those in your app as resources. Instead, I''d just create a folder with the images in it, and include that folder in your setup project, installing it as a sub-folder in your application directory. Then, the path is always the same to the images:

System.IO.Path.Combine(Application.StartupFolder, "images");


这篇关于Visual Studio 2010中的图像数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆