Results 1 to 5 of 5

Thread: Database Help!

  1. #1

    Thread Starter
    Addicted Member Smie's Avatar
    Join Date
    Jun 1999
    Location
    Columbus, OH
    Posts
    249

    Post

    How can I search a database?

  2. #2
    Addicted Member
    Join Date
    Jan 1999
    Location
    Sydney,NSW,Australia
    Posts
    178

    Post

    Search the database for what ? What database format ? If record set could use SQL.


  3. #3

    Thread Starter
    Addicted Member Smie's Avatar
    Join Date
    Jun 1999
    Location
    Columbus, OH
    Posts
    249

    Post

    Im not used to databases. But i need to search for a certain record.

  4. #4
    Addicted Member
    Join Date
    Jan 1999
    Location
    Sydney,NSW,Australia
    Posts
    178

    Post

    Ok sorry support call came up

    So if you are using access/sqlv6 or 7

    In Declarations something like

    Private db as database
    Private rs as recordset
    Private sSQL as string

    Say a search command button

    Private Command1_Click()

    if a single record, searching for name smith

    rs.findfirst("Name = 'Smith'")

    if multple records

    sSQL = "SELECT * FROM Customer WHERE Name = 'Smith'"

    set rs = db.openrecordset(sSQL)

    This will set the rs object to only Customer records where field Name = Smith

    Hope it helps.

  5. #5
    Addicted Member
    Join Date
    Jan 1999
    Location
    Sydney,NSW,Australia
    Posts
    178

    Post

    Sorry l keep having to any answer service calls if it wasn't for users this job would be so much easier. Anyway where was l, ok if you want an example project of searching a database email me at [email protected] and l will send you one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width