setup.exe does not install sdf file

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2008
Posts: 42
Reputation: Bill Purkins is an unknown quantity at this point 
Solved Threads: 1
Bill Purkins Bill Purkins is offline Offline
Light Poster

setup.exe does not install sdf file

 
0
  #1
Dec 20th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 710
Reputation: Teme64 will become famous soon enough Teme64 will become famous soon enough 
Solved Threads: 115
Teme64's Avatar
Teme64 Teme64 is offline Offline
Master Poster

Re: setup.exe does not install sdf file

 
0
  #2
Dec 22nd, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 42
Reputation: Bill Purkins is an unknown quantity at this point 
Solved Threads: 1
Bill Purkins Bill Purkins is offline Offline
Light Poster

Re: setup.exe does not install sdf file

 
0
  #3
Dec 22nd, 2008
Originally Posted by Teme64 View Post
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 710
Reputation: Teme64 will become famous soon enough Teme64 will become famous soon enough 
Solved Threads: 115
Teme64's Avatar
Teme64 Teme64 is offline Offline
Master Poster

Re: setup.exe does not install sdf file

 
0
  #4
Dec 22nd, 2008
Yes, it should be the current folder.
I suggest doing a simple FileExists test, if possible
  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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum


Views: 1186 | Replies: 3
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC