Results 1 to 2 of 2

Thread: SQL in VB

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2000
    Location
    London, UK
    Posts
    39

    Talking

    Hi,

    Can anyone help please help me in displaying the results of an SQL querie:
    1) in a form
    2) in a picture box
    3) in a data grid

    All I can get is VB to run the querie, but dont know how to display the results on the screen.

    I will be very greatful for all your responce

    Thanx again
    Sajjad

  2. #2
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736

    Cool

    To display the information on a form, you use the properties of the text boxes to connect to the recordset.

    Such as
    Code:
        Set Text1.DataSource = rsRecordSet
        Text1.DataField = "user_id"
        
        Set Text2.DataSource = rsRecordSet
        Text2.DataField = "user_name"
    To move through the records, create command buttons that navigate for you using rsRecordSet.movePrevious, rsRecordSet.moveNext, etc.

    For a datagrid, I use an ADO data control since it sets up the columns for you.

    [Edited by jbart on 09-20-2000 at 09:33 AM]

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