deployment of vb.net app and access database problem

Hi

I am working on a project using vs.net 2003 and access database.

the problem is that I created a installer and try to install to other computers

The installation is succeed on any computer, but when click on .exe file, some

computers work fine, but some others just can not load data from access database

only the form shows up without the data. Then I change the code a little bit. I use

Application.ExcutablePath to location the database file when the program in the run time, the path given is right, but still the same problem, a form without data

can anyone tell me the reason why it can find the db in some computers but not in others.

I found out that if I login the windows using my username and password, the application worked. but someone else using their's to login, the application didnt work. I dont know what the relationship between the network permissions and the permissions in the access database. I have no idea to config the access database. The Admin is the default user id in access, I dont have password for it. I think the application should run on any computer.

this is my connection string

Dim a As Integer = Application.ExecutablePath.IndexOf("sentrySYLLABUS")
Dim c As String = Application.ExecutablePath
Dim v As String = c.Substring(0, a)
Dim path As String = v + "Syllabus.mdb"
Dim dbConnect As OleDb.OleDbConnection = New OleDb.OleDbConnection
Dim connString As String = "Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database L" & _
"ocking Mode=1;Data Source=" + path + ";Jet OLEDB:Engine Type=5;Pro" & _
"vider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet OLEDB:SFP=False;p" & _
"ersist security info=False;Extended Properties=;Mode=Share Deny None;Jet OLEDB:E" & _
"ncrypt Database=False;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Cop" & _
"y Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID" & _
"=Admin;Jet OLEDB:Global Bulk Transactions=1"
'Dim dbConnect As OleDb.OleDbConnection = New OleDb.OleDbConnection
dbConnect.ConnectionString = connString
Return dbConnect

can you give some me some idea about the permission thing

Can anyone give a solution

thank you very very much

[2531 byte] By [FrankZeng] at [2007-12-19]
# 1

What OS were the PCs in question ? From memory, you need an up to date MDAC for Access to work ?

cgraus at 2007-9-8 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 2
I am using winxp professional version 2002, service pack 2
FrankZeng at 2007-9-8 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 3
OK, if all the PCs are XP. then that isn't the problem.
cgraus at 2007-9-8 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 4

I have a simple program that has 2 references

Microsoft ActiveX Data Objects 2.8 Library

Microsoft Jet and Replication Objects 2.6 Library

There is a single button on a form. The button is to compact an Access database.

Private Sub btnCompact_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCompact.Click

Try

Dim jro As JRO.JetEngine

jro = New JRO.JetEngine()

jro.CompactDatabase("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\nwind.mdb", _

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\NewNwind.mdb;Jet OLEDB:Engine Type=5")

MsgBox("Finished Compacting Database!")

Catch ex As Exception

MessageBox.Show("Error " & ex.Message, "Compact Error", MessageBoxButtons.OK)

End Try

End Sub

This program works fine on the development machine but when deployed the following error occurs:

Error 80040154, Retrieving the COM class factory for component with CLSID...

I have tried including Merge Modules for MDAC 2.8 and MS Jet 4 SP8.

This is not fix anything.

Any suggestions.

MRoy at 2007-9-8 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...

.NET Development

Site Classified