Results 1 to 5 of 5

Thread: Searching for Records in VB 6.0

  1. #1
    Join Date
    Dec 2010
    Posts
    6

    Searching for Records in VB 6.0

    Hello friends, I wanted to know, How is searching for records are done in Visual basic 6.0? I have no idea about it but as per my job I do have to search some records from Visual basic 6.0. In order to search the records from visual basic 6.0 and get the details of the appropriate user, I have to know how to search the records in visual basic 6.0. Can anyone help me out with this query so that I could search the records from VB 6.0 and get the details for the users.

  2. #2
    Join Date
    May 2009
    Posts
    637

    Re: Searching for Records in VB 6.0

    1.> In Dynaset or Snapshot Recordsets, The following methods are used to search for records in dynasets or snapshots:
    1. FindFirst Begins search from the beginning of file
    2. FindLast Begins search from the end of file
    3. FindNext Begins search from current record and proceeds forward
    4. FindPreviousBegins search from current record and proceeds backward.

  3. #3
    Join Date
    May 2009
    Posts
    539

    Re: Searching for Records in VB 6.0

    Criteria is similar to SQL's Where clause. Field names having spaces are enclosed in square brackets. For string comparison, the string must be enclosed in single quotes. However, for numeric comparison numbers are not enclosed in single quotes. v. You can use operators such as =, >, <, >=, <=, <>, Like, Between and In for comparison. ExamplesdatBooks.Recordset.FindFirst "BookId >= 10" datStudents.RecordSet.FindNext "Name = 'Salil'"B. In Table Recordsets (Seek Method) To search for records in Table Recordsets, the Seek Method is used.

  4. #4
    Join Date
    May 2009
    Posts
    527

    Re: Searching for Records in VB 6.0

    The Seek method uses indexes for searching. So, before calling the Seek method you must first set the Index property to the name of an index in your table. .In an Access table, the index on the primary key is called Primary Key. Other indexes usually have the names of the fields. Comparison Operator can be "=", "<", ">", "<=" or ">=". v. FieldValue is the value to be matched. Strings are enclosed in single quotes but numeric values are not.

  5. #5
    Join Date
    May 2009
    Posts
    511

    Re: Searching for Records in VB 6.0

    ExampledatBooks.Recordset.Seek ">", "10" datStudents.Recordset.Seek "=", "'Salil'"The NoMatch Property If none of the records satisfies the search condition in the above search methods, the No Match property is set to True. However, if a record is found, it is made the current record and the No Match property is set to False. This property is used to check whether a record is found. The BookMark Property (explained below) is generally used when no matching record is found.

Similar Threads

  1. Searching for maps to download for LG N10
    By Kaalicharan in forum Portable Devices
    Replies: 6
    Last Post: 18-06-2010, 10:09 PM
  2. Searching best book for vb.net
    By Khan Baba in forum Software Development
    Replies: 6
    Last Post: 06-01-2010, 10:33 AM
  3. Searching for some software's and their features.
    By Deepest BLUE in forum Windows Software
    Replies: 3
    Last Post: 28-11-2009, 03:37 AM
  4. Searching For Depth and Breadth First
    By Segvoia in forum Software Development
    Replies: 3
    Last Post: 23-02-2009, 02:22 PM
  5. Searching File on Network
    By Max_Miraa in forum Windows Software
    Replies: 3
    Last Post: 14-02-2009, 02:56 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,291,057.41829 seconds with 16 queries