CodePudding user response:
No one knows or can't achieve that?CodePudding user response:
Your design direction is wrong, multiple computers use should not use the ACCESS database, using SQL Server, specify a database ServerFile database path concept, the concept of the database server, there is no path
CodePudding user response:
With Microsoft Common Dialog Control 6.0 controls, ShowOpen () method is used to locate files,VB own SaveSetting/GetSetting method save/reading configuration,
The configuration is stored in the registry HKEY_CURRENT_USER \ Software \ VB and VBA Program Settings \ & lt; AppName> Under \,
CodePudding user response:
With essentially a proposal databaseCodePudding user response:
Single machine with Access to multiple clients with used, such as Oracle,CodePudding user response:
Give you an idea, set up a database connection in the program interface, this interface can enter the database name, path, click ok, stored in the Access database, so the computer database name and the path of the database, then connect to the database should be no problem now,CodePudding user response:
The above said method is to your program in C set, and the ACCESS database in other partitions, if you directly to the exe files, database copy to any partition, you can use the App. The Path method, after copying the exe file also can be a shortcut on the desktop, but the premise is must have the VB platform, namely all register OCX controls,CodePudding user response:
Can use the registry, save or use file save canTo run a file location form, select complete save to a text file or registries can
Use CommonDialog control + API ShellExecute can choose
Add a CommonDialog
'
control'general statement
Private Declare Function ShellExecute Lib "Shell32. DLL" Alias "ShellExecuteA" (ByVal HWND As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Const SW_SHOW=5
'button eventsPrivate Sub Command1_Click ()
On Error GoTo userCanceled
With CommonDialog1
. CancelError=True
The Flags=cdlOFNHideReadOnly Or cdlOFNAllowMultiselect Or cdlOFNExplorer Or cdlOFNNoDereferenceLinks
. The Filter="MDB files (*. MDB) | *. MDB"
. ShowOpen
ShellExecute Me. HWND, "open", FileName, ""," ", SW_SHOW
End With
UserCanceled:
End Sub