Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
как использовать seek в рекордсете ADO ?
|
|||
|---|---|---|---|
|
#18+
как использовать seek в рекордсете ADO ? что надо поставить на KeyValues ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.09.2004, 14:50 |
|
||
|
как использовать seek в рекордсете ADO ?
|
|||
|---|---|---|---|
|
#18+
вот тебе кусочек МСДН-а MDAC 2.5 SDK - ADO Seek Method and Index Property Example (VB) This example uses the Recordset object's Seek method and Index property in conjunction with a given Employee ID, to locate the employee's name in the Employees table of the Nwind.mdb database. Public Sub Main() SeekX End Sub Public Sub SeekX() Dim rst As ADODB.Recordset Dim strID As String Dim strPrompt As String strPrompt = "Enter an EmployeeID (e.g., 1 to 9)" Set rst = New ADODB.Recordset rst.CursorLocation = adUseServer rst.Open "employees", _ "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=c:\temp\northwind.mdb;" & _ "user id=admin;password=;", _ adOpenKeyset, adLockReadOnly, adCmdTableDirect ' Does this provider support Seek and Index? If rst.Supports(adIndex) And rst.Supports(adSeek) Then rst.Index = "EmployeeId" ' Display all the employees. rst.MoveFirst Do While rst.EOF = False Debug.Print rst!EmployeeID; ": "; rst!firstname; " "; _ rst!LastName rst.MoveNext Loop ' Prompt the user for an EmployeeID between 1 and 9. rst.MoveFirst Do strID = LCase(Trim(InputBox(strPrompt, "Seek Example"))) ' Quit if strID is a zero-length string (CANCEL, null, etc.) If Len(strID) = 0 Then Exit Do If Len(strID) = 1 And strID >= "1" And strID <= "9" Then rst.Seek Array(strID), adSeekAfterEQ If rst.EOF Then Debug.Print "Employee not found." Else Debug.Print strID; ": Employee='"; rst!firstname; " "; _ rst!LastName; "'" End If End If Loop End If rst.Close End Sub ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.09.2004, 15:07 |
|
||
|
|

start [/forum/topic.php?fid=60&fpage=354&tid=2168822]: |
0ms |
get settings: |
10ms |
get forum list: |
15ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
33ms |
get topic data: |
10ms |
get forum data: |
2ms |
get page messages: |
48ms |
get tp. blocked users: |
2ms |
| others: | 243ms |
| total: | 369ms |

| 0 / 0 |
