Dim cmd As New ADODB.Command, RSado As New ADODB.Recordset Dim RSdao As DAO.Recordset, i As Integer cmd.ActiveConnection = "Server=HP-PC ;database=Bid ;Integrated Security=true ;" cmd.CommandTimeout = 600 cmd.CommandType = adCmdStoredProc cmd.CommandText = "sp_addlink" cmd.Parameters("@path").Value = CurrentDb().Name Set RSado = cmd.Execute Set RSdao = CurrentDb.OpenRecordset("tbl1") Do While Not RSado.EOF RSdao.AddNew For i = 0 To RSado.Fields.Count - 1 RSdao(i) = RSado(i) Next RSdao.Update RSado.MoveNext Loop RSdao.Close RSado.Close cmd.ActiveConnection.Close
sp_addlink
sp_addlinkedserver
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)