منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : بروجكت بحث عن اسم بواسطة seek
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
لو سمحتوا احتاج مشروع بحث عن اسم بواسطة ال seek
انت سألت والاجابة لغيرك
PHP كود :
Option Compare Database
Option Explicit

Function SeekRecord()
    
Dim conn As ADODB.Connection
    Dim rst 
As ADODB.Recordset

    Set conn 
= New ADODB.Connection
    Set rst 
= New ADODB.Recordset

    
'Set the connection properties and open the connection.
    With conn
        .Provider = "Microsoft.Jet.OLEDB.4.0"
        .ConnectionString = "<Drive>\<Path to Northwind sample database>"
        .Open
    End With

    With rst
        '
Select the index used in the recordset.
        .
Index "PrimaryKey"

        'Set the location of the cursor service.
        .CursorLocation = adUseServer

        '
Open the recordset.
        .
Open "Order Details"connadOpenKeyset_
          adLockOptimistic
adCmdTableDirect

        
'Find the customer order where OrderID = 10255 and ProductID = 16.
        .Seek Array(10255, 16), adSeekFirstEQ

        '
If a match is found, print the quantity of the customer order.
        If 
Not rst.EOF Then
            Debug
.Print rst.Fields("Quantity").Value
        End 
If
    
End With
End Functio