Пример использования связанных переменных в sql-запросе
Dim rs_s As New ADODB.Recordset Dim cn_s As New ADODB.Connection Dim cm_s As New ADODB.Command cm_s.CommandText = "select * from test where id=?" cm_s.Prepared = True cm_s.Parameters.Append cm_s.CreateParameter("id", adInteger, adParamInput, 8, Null) cm_s.ActiveConnection = cn_s cm_s("id") = n_id rs_s.Open cm_s '.. rs_s.Close
Комментарии