STRING PARA CONEXAO REMOTA

ALMIRSAFADI 17/08/2007 10:43:30
#231320
Para acesso via rede seria assim
\\Servidor\dados\banco.mdb
E para acesso remoto qual seria a string?
Grato
SILVERDRAGON 17/08/2007 12:42:19
#231375
Olha aqui....

''==================================
''Remote OLE DB Provider Connections
''==================================

MS Remote - Access (Jet)
ODBC DSN
Conn.Open "Provider=MS Remote; Remote Server=http://ServerName; Remote Provider=MSDASQL; DSN=AdvWorks; Uid=myUsername; Pwd=myPassword;"

OLE DB Provider
Conn.Open "Provider=MS Remote; Remote Server=http://ServerName; Remote Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\path\\mydb.mdb;", "admin", ""

MS Remote - SQL Server

ODBC DSN
Conn.Open "Provider=MS Remote; Remote Server=http://server; Remote Provider=MSDASQL; DSN=DatabaseName; Uid=Username; Pwd=Password;"

OLE DB Provider
Conn.Open "Provider=MS Remote; Remote Server=http://ServerName; Remote Provider=SQLOLEDB; Data Source=ServerName; Initial Catalog=DatabaseName; User ID=Username; Password=Password;"

=================================
.NET Managed Provider Connections
=================================

SQL Client .NET Managed Provider (System.Data.SqlClient)
Dim Conn As SqlClient.SqlConnection
Dim ConnStr As String

ConnStr = "Data Source=(local); Initial Catalog=NorthWind; Integrated Security=SSPI; Pooling=True; Min Pool Size=10; Max Pool Size=50; Connection Lifetime=30; Connection Reset=True; Enlist=True;"
Conn = New SqlClient.SqlConnection(ConnStr)
Conn.Open()
OLE DB .NET Managed Provider (System.Data.OleDb)
Dim Conn As OleDb.OleDbConnection
Dim ConnStr As String

ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=nwind.mdb; User ID=Admin; Password=;"
Conn = New OleDb.OleDbConnection(ConnStr)
Conn.Open()



Ve em qual delas vc c encaixa..

flw
Tópico encerrado , respostas não são mais permitidas