B
Bob Davies
I have an SQL Server database which has been upsized from
Access. I have written a procedure that Creates a new
table.
However, the ADP cannot see the new table until I go into
the table list and hit f5. I need to refresh this link
automatically.
Public Function fnc_test()
Dim cn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rs As New ADODB.Recordset
Set db = CurrentDb
cn.Provider = "sqloledb"
cn.Properties("Data Source").Value = "(Local)"
cn.Properties("Initial Catalog").Value = "GDLSQL"
cn.Properties("Integrated Security").Value = "SSPI"
cn.Open
cmd.ActiveConnection = cn
cmd.CommandText = "fnc_master"
cmd.CommandType = adCmdStoredProc
tbl = "temp_tbl_master"
DoCmd.DeleteObject acTable, tbl
Set rs = cmd.Execute
End Function
Access. I have written a procedure that Creates a new
table.
However, the ADP cannot see the new table until I go into
the table list and hit f5. I need to refresh this link
automatically.
Public Function fnc_test()
Dim cn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rs As New ADODB.Recordset
Set db = CurrentDb
cn.Provider = "sqloledb"
cn.Properties("Data Source").Value = "(Local)"
cn.Properties("Initial Catalog").Value = "GDLSQL"
cn.Properties("Integrated Security").Value = "SSPI"
cn.Open
cmd.ActiveConnection = cn
cmd.CommandText = "fnc_master"
cmd.CommandType = adCmdStoredProc
tbl = "temp_tbl_master"
DoCmd.DeleteObject acTable, tbl
Set rs = cmd.Execute
End Function