Home > Software engineering >  Vb2010 production software installation package
Vb2010 production software installation package

Time:09-22

Everybody is good, now I is writing a program, including a few lines of code is used in a folder with vb2010 code below to create a MDB database file, the following code
 Private Sub CreateAccess (ByVal sender As System. Object, ByVal e the As System. EventArgs) 
Dim MyCat As Catalog=New Catalog ()
MyCat. Create (" Provider=Microsoft. Jet. The OLEDB. 4.0; The Jet OLEDB: Engine Type=5; Data Source="& amp; System. Windows. Forms. Application. StartupPath & amp; "\ temporary files. MDB)
End Sub

I then other location in a program calls the function CreateAccess (sender, e)

Running this program on your computer is no problem, or released into the software installation package can also run after installed on your computer, the software installation package, but if released into complains of the program, on the other computer!! An error content is: "Microsoft Jet database engine can't open the file XXX. MDB" it has been opened by other users in exclusive mode or do not have permission to view the data
As shown in figure

Could you tell me how to change program should be?
The machine system Windows 7 visual studio 2010

CodePudding user response:

User set as the default administrator try, maybe win 7 login account problem between CA, or

CodePudding user response:

Write a CMD take authority's instructions, the software processing

CodePudding user response:

(I'm VS2008, if there is any difference, you correct)
You released at the engineering properties of \ application file, the MDB release status should choose "data file", it will be installed to the Documents and Settings directory instead of rights restricted the Program Files,
When spelling a connection string, it should be My.Com puter. FileSystem. SpecialDirectories. CurrentUserApplicationData directory,
  • Related