PC Review


Reply
Thread Tools Rate Thread

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

 
 
Al Repasky
Guest
Posts: n/a
 
      6th Jul 2004
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 OLEDBatabase 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 OLEDBon't Copy Locale on
Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User
ID=Admin;Jet OLEDB:Global Bulk Transactions=1" />
</appSettings>
</configuration>
 
Reply With Quote
 
 
 
 
scorpion53061
Guest
Posts: n/a
 
      6th Jul 2004
Hi Al,

Check out http://www.kjmsolutions.com/flexible...tionstring.htm

I hope it helps.





________________________________

From: Al Repasky [private.php?do=newpm&u=]
Sent: Tuesday, July 06, 2004 1:05 PM
To: microsoft.public.dotnet.framework
Subject: Can not find a Access DB file when install on another PC.



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 OLEDBatabase 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 OLEDBon't Copy Locale on
Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User
ID=Admin;Jet OLEDB:Global Bulk Transactions=1" />
</appSettings>
</configuration>


 
Reply With Quote
 
Simon Smith
Guest
Posts: n/a
 
      6th Jul 2004
On 06 Jul 2004 19:04, Al Repasky wrote:
>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?
>


The only way I've ever connected to an Access DB from .NET is via an Odbc
connection with a Connect String of the form "DSN=dsnName". The age of
the PC shouldn't affect this, I would have thought. Possibly the version
of MDAC you have loaded would though (later MDAC versions don't install
Access providers by default anymore).

The connection string you're using looks very complex to me -


<add key="DBConn.ConnectionString" value="Jet OLEDB:Global Partial
Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDBatabase Locking
Mode=1;Data Source="C:\Program
Files\AutoMind\AutoMind\AutoMind.mde";Jet OLEDB:Engine
Type=5;Provider="Microsoft.Jet.OLEDB.4.0";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 OLEDBon't Copy Locale on
Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User
ID=Admin;Jet OLEDB:Global Bulk Transactions=1" />


- I really son't know what 75% of it means!

--
Simon Smith
simon dot s at ghytred dot com
www.ghytred.com/NewsLook - NNTP Client for Outlook


 
Reply With Quote
 
Phil Wilson
Guest
Posts: n/a
 
      7th Jul 2004
That sounds right - MDAC doesn't install the Jet engine any more - that
could be the redist he's missing.
--
Phil Wilson [MVP Windows Installer]
----
"Simon Smith" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On 06 Jul 2004 19:04, Al Repasky wrote:
> >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?
> >

>
> The only way I've ever connected to an Access DB from .NET is via an Odbc
> connection with a Connect String of the form "DSN=dsnName". The age of
> the PC shouldn't affect this, I would have thought. Possibly the version
> of MDAC you have loaded would though (later MDAC versions don't install
> Access providers by default anymore).
>
> The connection string you're using looks very complex to me -
>
>
> <add key="DBConn.ConnectionString" value="Jet OLEDB:Global Partial
> Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDBatabase Locking
> Mode=1;Data Source="C:\Program
> Files\AutoMind\AutoMind\AutoMind.mde";Jet OLEDB:Engine
> Type=5;Provider="Microsoft.Jet.OLEDB.4.0";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 OLEDBon't Copy Locale on
> Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User
> ID=Admin;Jet OLEDB:Global Bulk Transactions=1" />
>
>
> - I really son't know what 75% of it means!
>
> --
> Simon Smith
> simon dot s at ghytred dot com
> www.ghytred.com/NewsLook - NNTP Client for Outlook
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't find file so I can install XP extras =?Utf-8?B?REVCTkM=?= Windows XP Help 2 17th Oct 2007 04:12 AM
VISTA CANNOT FIND INSTALL FILE =?Utf-8?B?dG9tbXluZWVs?= Windows Vista Installation 2 22nd Sep 2006 04:02 AM
can not find .exe file and install.log file of some programs dw Windows XP General 2 24th Jun 2004 07:52 PM
cannot find install.log file Kathy Windows XP Hardware 1 14th Nov 2003 02:35 AM
SP4 will not install, cannot find file imejp.ime mike Microsoft Windows 2000 Windows Updates 0 23rd Aug 2003 06:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:52 PM.