I wrote an VB Program to access to an Access database which store in a web server. When I use it in an intranet is no problem. But when i try to access the data use internet it said "Requested operation requires an OLE DB Session object, which is not supported by the current provider."
The code is something like below:
Public Function initConnection(tempIP As String)
On Error Resume Next
Dim db As String
db = tempIP & "\wwwroot\CN\FDP\Cn.mdb"
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & db & ";Mode=Share Deny None;OLE DB Services=2"
cmd.ActiveConnection = cn
initConnection = Err.Description
Public Function DetectIP() As Integer
DetectIP = False
If initConnection("\\220.127.116.11") = "" Then
IP = "\\18.104.22.168")
ElseIf initConnection("//622.214.171.124") = "" Then
IP = "//6126.96.36.199"
displayMsg ("Can not establish Conection")
DetectIP = True
Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!
Or try our Ask An Expert service to answer any of your questions!