منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
بروجكت بحث عن اسم بواسطة seek - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم أسئلة واستفسارات الأعضاء - المنتدى القديم (http://vb4arb.com/vb/forumdisplay.php?fid=94)
+--- قسم : قسم Visual Basic 6 وما قبله (http://vb4arb.com/vb/forumdisplay.php?fid=167)
+--- الموضوع : بروجكت بحث عن اسم بواسطة seek (/showthread.php?tid=12507)



بروجكت بحث عن اسم بواسطة seek - rasharor - 14-06-15

لو سمحتوا احتاج مشروع بحث عن اسم بواسطة ال seek


RE: بروجكت بحث عن اسم بواسطة seek - أبو عمر - 25-09-15

انت سألت والاجابة لغيرك
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