| | |
setup.exe does not install sdf file
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
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: 1186 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net 2008 access add advanced application array assignment basic beginner box browser button buttons center class click client code combo convert cpu cuesent data database datagrid datagridview datetimepicker design designer dissertation dissertations editvb.net employees excel exists forms function html images isnumericfuntioncall lib listview map mobile module msaccess mssqlbackend mysql net number open page pan pdf picturebox picturebox2 port print printing printpreview problem record refresh regex reuse richtextbox right-to-left save search serial settings socket sorting sqldatbase sqlserver storedprocedure structures studio temp textbox timer txttoxmlconverter usercontol vb vb.net vb2008 vba vbnet vista visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winsock wpf wrapingcode xml





