Results 1 to 14 of 14

Thread: <help>Populate DATAGRID using ADODB [SOLVED]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2004
    Location
    Bahrain
    Posts
    306

    Resolved <help>Populate DATAGRID using ADODB [SOLVED]

    Hi guys,

    I need help to populate a DataGrid usingi the ADODB 2.8 by MS-Access Table.

    Here's the code which I use for ADODC but in my case I want to use ADODB.
    VB Code:
    1. Private Sub Combo1_Click()
    2.  
    3. SQL = "Select EmployeesData.[FirstName], EmployeesData.[SecondName], Contacts.[Mobile]"
    4. SQL = SQL & "From [EmployeesData], [Contacts]"
    5. SQL = SQL & "Where EmployeesData.[EmpID] = Contacts.[EmpID]"
    6. SQL = SQL & "And EmployeesData.[FirstName]='" & Combo1.Text & "';"
    7.  
    8. Adodc1.RecordSource = SQL                   ' Execute your query
    9. Set DataGrid1.DataSource = Adodc1    ' Bind to the data control


    Can anyone help please ??

    Many thanks in advance,

    habibalby
    Last edited by Habibi; Jan 26th, 2005 at 12:20 PM.
    Current Project: General Employees Database (Employees Information) & (Training Details).

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