- Код: Выделить всё
Adodc1.RecordSource = "SELECT * FROM Registration ORDER BY [Name] ASC"
Adodc1.Refresh - ругается на ЭТО
В чем фишка?
Adodc1.RecordSource = "SELECT * FROM Registration ORDER BY [Name] ASC"
Adodc1.Refresh - ругается на ЭТО
GSerg писал(а):В отсутствии open?
Dim cmd As String
cmd = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" & _
"C:\Documents and Settings\Adimn\Рабочий стол\Serv\Registr.mdb"
Set cn = New ADODB.Connection
Dim sql As String
sql = "select * from Registration" ' создаем запрос
With cn
.ConnectionString = cmd
.Open
End With
Set rs = New ADODB.Recordset
rs.Open sql, cn, adOpenDynamic, adLockOptimistic
Adodc1.RecordSource = "SELECT * FROM Registration ORDER BY [Name] ASC"
Adodc1.Refresh
Set rs = Nothing
Adodc1.RecordSource = "SELECT * FROM Registration ORDER BY Name ASC"
Dim cmd As String
cmd = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" & _
"C:\Documents and Settings\Boss IT\Рабочий стол\Serv\Registr.mdb"
Set cn = New ADODB.Connection
Dim sql As String
sql = "select * from Registration" ' создаем запрос
With cn
.ConnectionString = cmd
.Open
End With
Set rs = New ADODB.Recordset
rs.Open sql, cn, adOpenDynamic, adLockOptimistic
Adodc1.RecordSource = "SELECT * FROM Registration ORDER BY Name ASC"
Adodc1.Refresh
Set rs = Nothing
Adodc1.CommandType = adCmdText
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Boss IT\Рабочий стол\Serv\Registr.mdb;Persist Security Info=False"
Adodc1.CursorType = adOpenDynamic
Adodc1.RecordSource = "SELECT * FROM Registration ORDER BY Name ASC"
Adodc1.Refresh
Dim cmd As String
cmd = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" & _
"C:\Documents and Settings\Boss IT\Рабочий стол\Serv\Registr.mdb"
Set cn = New ADODB.Connection
Dim sql As String
sql = "select * from Registration" ' создаем запрос
With cn
.ConnectionString = cmd
.Open
End With
Set rs = New ADODB.Recordset
rs.Open sql, cn, adOpenDynamic, adLockOptimistic
Set rs = Nothing
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 82