MS Remote provider

  • Thread starter Thread starter Lic. Roberto L. Blanco
  • Start date Start date
L

Lic. Roberto L. Blanco

Look at the source below.

When i execute the code below, the table [OutputTable] is created into the
database located at the 'temp' directory in the web server !!!!!!!!!!!

How can i do to create it into the drive C of my desktop computer ????

----------------------------------------------------------------------------
Private Sub CopyFromWebServer()
Dim Table As New Table
Dim Cat As New Catalog
Dim cnn As ADODB.Connection

Cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Temp\OutputDB.mdb"

For Each Table In Cat.Tables
If (Table.Name = "OutputTable") Then
Cat.Tables.Delete Table.Name
Exit For
End If
Next
Cat.Tables.Refresh

Set cnn = New ADODB.Connection
cnn.CursorLocation = adUseClient
cnn.Open "Provider=MS Remote;Remote Server=http://www.mysite.com;Remote
provider=Microsoft.Jet.OLEDB.4.0;Data
Source=D:\Inetpub\wwwroot\database\DB1.mdb;"

cnn.Execute "Select * into [OutputTable] In 'C:\Temp\OutputDB.mdb' from
[InputTable]"

End Sub
 
Copy OutPutDB.mdb to C: and change the source string
accordingly (source=C:\OutPutDB.mdb)

Hope this helps.
-----Original Message-----
Look at the source below.

When i execute the code below, the table [OutputTable] is created into the
database located at the 'temp' directory in the web server !!!!!!!!!!!

How can i do to create it into the drive C of my desktop computer ????

---------------------------------------------------------- ------------------
Private Sub CopyFromWebServer()
Dim Table As New Table
Dim Cat As New Catalog
Dim cnn As ADODB.Connection

Cat.ActiveConnection
= "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Temp\OutputDB.mdb"

For Each Table In Cat.Tables
If (Table.Name = "OutputTable") Then
Cat.Tables.Delete Table.Name
Exit For
End If
Next
Cat.Tables.Refresh

Set cnn = New ADODB.Connection
cnn.CursorLocation = adUseClient
cnn.Open "Provider=MS Remote;Remote Server=http://www.mysite.com;Remote
provider=Microsoft.Jet.OLEDB.4.0;Data
Source=D:\Inetpub\wwwroot\database\DB1.mdb;"

cnn.Execute "Select * into [OutputTable] In 'C:\Temp\OutputDB.mdb' from
[InputTable]"

End Sub
--------------------------------------------------------- ------------------
-

Thanks in advance







.
 
Back
Top