要在VB.net中获取DataDirectory路径? [英] To Get DataDirectory Path in VB.net?
本文介绍了要在VB.net中获取DataDirectory路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在\ bin \ debug中拥有Access数据库..我正在创建一个实用程序来备份.因此,我需要获取数据库的路径.之后,我将从该位置将该文件复制到其他位置.所以请帮我走路.
I have Access Database in \bin\debug..I am creating one utility to take Backup.So that I need to get the path of database..After that i will copy that file from that location to other location..So plz help me to get path.
推荐答案
path = Application.StartupPath & "\creation.mdb"
If My.Computer.FileSystem.FileExists(path)
Then
MessageBox.Show("File is available")
Else
MessageBox.Show("File is Not available")
End If
我尝试过并且有效.
这篇关于要在VB.net中获取DataDirectory路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文