| | |
setup.exe does not install sdf file
Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2008
Posts: 42
Reputation:
Solved Threads: 1
Hi,
I am using Visual Basic 2008 Express Edition and published an application, and when I run the setup, it seems to install okay but when you run the program get an error message that the .sdf file is not found. I am using a Compact SQL database.
I have looked through various section of code but don't know what to change or where. Can anyone help?
Thanks in advance,
Bill Purkins
I am using Visual Basic 2008 Express Edition and published an application, and when I run the setup, it seems to install okay but when you run the program get an error message that the .sdf file is not found. I am using a Compact SQL database.
I have looked through various section of code but don't know what to change or where. Can anyone help?
Thanks in advance,
Bill Purkins
Check that
1) SDF-file is really installed i.e. copied during installation
2) check your connection string. See Connection strings for SQL Server Compact Edition. Make sure your Data Source points to the SDF-file, which is installed by your customer (or the installer to be more precise). There may be just wrong drive letter or different path in the connection string
1) SDF-file is really installed i.e. copied during installation
2) check your connection string. See Connection strings for SQL Server Compact Edition. Make sure your Data Source points to the SDF-file, which is installed by your customer (or the installer to be more precise). There may be just wrong drive letter or different path in the connection string
Teme64 @ Windows Developer Blog
•
•
Join Date: Jul 2008
Posts: 42
Reputation:
Solved Threads: 1
•
•
•
•
Check that
1) SDF-file is really installed i.e. copied during installation
2) check your connection string. See Connection strings for SQL Server Compact Edition. Make sure your Data Source points to the SDF-file, which is installed by your customer (or the installer to be more precise). There may be just wrong drive letter or different path in the connection string
Thanks,
Bill Purkins
Yes, it should be the current folder.
I suggest doing a simple FileExists test, if possible
with the installed application.
I suggest doing a simple FileExists test, if possible
VB.NET Syntax (Toggle Plain Text)
Dim CurrentPath As String CurrentPath = Application.StartupPath & "\" If My.Computer.FileSystem.FileExists(CurrentPath & "<DBname>.sdf") Then MessageBox.Show("Database file exists", _ "Exists", _ MessageBoxButtons.OK, _ MessageBoxIcon.Information) Else MessageBox.Show("Database file not found", _ "Exists", _ MessageBoxButtons.OK, _ MessageBoxIcon.Warning) End If
Teme64 @ Windows Developer Blog
![]() |
Similar Threads
- spyware, adaware and viruses (Viruses, Spyware and other Nasties)
Other Threads in the VB.NET Forum
- Previous Thread: displaying the values in the combobox
- Next Thread: read FROM crystal reports in vb
Views: 1190 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net .net2008 2008 access advanced application array basic beginner browser button buttons center class click client code combo convert cuesent data database datagrid datagridview date datetimepicker design designer dissertation dissertations dissertationtopic eclipse excel exists fade filter forms function html images lib listview map mobile module msaccess net number objects open panel pdf picturebox picturebox2 port position print printing problem read refresh regex richtextbox right-to-left save search serial settings shutdown socket sorting sqldatbase sqlserver studio temperature textbox timer timespan transparency txttoxmlconverter usercontol validation vb vb.net vb2008 vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web webbrowser winforms winsock wpf wrapingcode xml year





