943,685 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 1777
  • VB.NET RSS
Dec 20th, 2008
0

setup.exe does not install sdf file

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 1
Light Poster
Bill Purkins is offline Offline
42 posts
since Jul 2008
Dec 22nd, 2008
0

Re: setup.exe does not install sdf file

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
Reputation Points: 218
Solved Threads: 201
Veteran Poster
Teme64 is offline Offline
1,024 posts
since Aug 2008
Dec 22nd, 2008
0

Re: setup.exe does not install sdf file

Click to Expand / Collapse  Quote originally posted by Teme64 ...
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 for your response, I did look at the connection string and it appears to have no path specified, which to me would imply the current folder, no?
Thanks,
Bill Purkins
Reputation Points: 10
Solved Threads: 1
Light Poster
Bill Purkins is offline Offline
42 posts
since Jul 2008
Dec 22nd, 2008
0

Re: setup.exe does not install sdf file

Yes, it should be the current folder.
I suggest doing a simple FileExists test, if possible
VB.NET Syntax (Toggle Plain Text)
  1. Dim CurrentPath As String
  2. CurrentPath = Application.StartupPath & "\"
  3. If My.Computer.FileSystem.FileExists(CurrentPath & "<DBname>.sdf") Then
  4. MessageBox.Show("Database file exists", _
  5. "Exists", _
  6. MessageBoxButtons.OK, _
  7. MessageBoxIcon.Information)
  8. Else
  9. MessageBox.Show("Database file not found", _
  10. "Exists", _
  11. MessageBoxButtons.OK, _
  12. MessageBoxIcon.Warning)
  13. End If
with the installed application.
Reputation Points: 218
Solved Threads: 201
Veteran Poster
Teme64 is offline Offline
1,024 posts
since Aug 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: displaying the values in the combobox
Next Thread in VB.NET Forum Timeline: read FROM crystal reports in vb





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC