Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Setup / July 2004

Tip: Looking for answers? Try searching our database.

Can not find a Access DB file when install on another PC.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Al Repasky - 06 Jul 2004 19:07 GMT
I have written a VB.NET 2003 program that accesses a Access DB.  On my
development PC it works fine.  I created a setup program so that I can
install this on other computers.  Of source, I have to install the
.NET framework first.  But when I run the program on the other PC it
does not find the DB, even when it displays the correct file string.

Here is what I tried and it does not work.  Maybe it is too old to run
.NET on.
It is a Pentium 120.

Does anyone have any more ideas how to make this work?

Thanks,
Al
-------------------------------
Here is the code it now has:

'
'DBConn
'
Me.DBConn.ConnectionString =
CType(configurationAppSettings.GetValue("DBConn.ConnectionString",
GetType(System.String)), String)

----------------------------------
Here is the code that does not find the file:

       Dim str As String
       Dim int As Integer
       Dim Adapt1 As OleDb.OleDbDataAdapter

       'Create SQL Statement
       str = "SELECT tYear FROM tAutos GROUP BY tYear ORDER BY tYear"

       'Load table
       Adapt1 = New OleDb.OleDbDataAdapter(str, DBConn)
       Try
           DBConn.Open()
       Catch
           MessageBox.Show("Database file can not be found.")
           MessageBox.Show(DBConn.DataSource)
           Application.Exit()
       End Try

-----------------------------------------------
Here is what is in the config file:

<?xml version="1.0" encoding="Windows-1252"?>
<configuration>
 <appSettings>
   <!--   User application and configured property settings go
here.-->
   <!--   Example: <add key="settingName" value="settingValue"/> -->
   <!--StartFragment -->
  <add key="DBConn.ConnectionString" value="Jet OLEDB:Global Partial
Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking
Mode=1;Data Source=&quot;C:\Program
Files\AutoMind\AutoMind\AutoMind.mde&quot;;Jet OLEDB:Engine
Type=5;Provider=&quot;Microsoft.Jet.OLEDB.4.0&quot;;Jet OLEDB:System
database=;Jet OLEDB:SFP=False;persist security info=False;Extended
Properties=;Mode=Share Deny None;Jet OLEDB:Encrypt Database=False;Jet
OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on
Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User
ID=Admin;Jet OLEDB:Global Bulk Transactions=1" />
</appSettings>
</configuration
Tim Macaulay[MSFT] - 21 Jul 2004 16:52 GMT
You may want to research using environment variables rather than hard
coding the path.  Does your database reside at  "C:\Program
Files\AutoMind\AutoMind\"?  If not, this is where I would start to ensure
that it is referencing the correct path.

Cheers,
Tim Macaulay, MCSD, MCP.Net
Microsoft Product Support
riprip - 23 Jul 2004 02:23 GMT
I got the answer to this.  MDAC had to be installed.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.