Quantcast
Viewing all articles
Browse latest Browse all 21136

Error on connecting Remote Database using by ADODB.Connection

i want to connect a remote ms access database in ISS Sever with Test as Virtual Directory , it showing the error " Internet Client Error: Cannot Connect to Server " then how can i solve this problem , pl any one help me

my VB code as

Option Explicit
Dim Db_Conn As ADODB.Connection
Dim Db_Name As String
Dim rs_SubLedger As ADODB.Recordset
Private Sub Form_Load()
Dim ConString As String, tempString As String
Set Db_Conn = New ADODB.Connection
ConString = "Provider=MS Remote;Remote Server=http://192.168.1.100:82/TEST/;Remote Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Compaby.mdb;Persist Security Info=False"
Db_Conn.CursorLocation = adUseServer
Db_Conn.ConnectionString = ConString
Db_Conn.Open , "admin", ""
Set rs_SubLedger = New ADODB.Recordset
rs_SubLedger.CursorLocation = adUseClient
rs_SubLedger.Open "Select * from Scheme", Db_Conn, adOpenKeyset, adLockReadOnly
While Not rs_SubLedger.EOF
If tempString <> "" Then
tempString = tempString & Chr(13)
End If
tempString = tempString & rs_SubLedger(0)
rs_SubLedger.MoveNext
Wend
Label1.Caption = tempString
End Sub



suppose i'll change the connection string to

ConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=//192.168.1.100/E/TEST/Compaby.mdb;Persist Security Info=False"

that E in Data source as my Local Driver

it is working perfectly , now what can i do

Viewing all articles
Browse latest Browse all 21136

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>