Results 1 to 2 of 2

Thread: ADO Runtime Problem

  1. #1

    Thread Starter
    Addicted Member Abrium's Avatar
    Join Date
    Feb 2007
    Location
    The Great State of Texas
    Posts
    205

    ADO Runtime Problem

    I'm brand spanking new to this and I can't seem to figure out why my datagridview won't populate from my dataset won't populate information.

    This is a small test sub on a seperate class I have written, its very basic, and the datagridview is supplied on a seperate form. Just some information.

    Here is my lil block o' code:

    Code:
        Sub test()
    
    
            conCust.Open()
            dsCust.Clear()
            accCommand.CommandText = "SELECT * FROM Customers"
            accCommand.Connection = conCust
            daCust.SelectCommand = accCommand
    
            Try
                daCust.Fill(dsCust, "Customers")
                frmMain.dvgFrmMain.DataSource = dsCust.Tables("Customers")
            Catch ex As Exception
    
            End Try
    
        End Sub
    I've also declared everyone within .Net public so I can move around for now. My public declarations are:

    Code:
    Public Class dvdClass
        Public dsCust As New DataSet
        Public conCust As New OleDbConnection(conString)
        Public daCust As New OleDbDataAdapter
        Public accCommand As New OleDbCommand
        Const conString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=..\DvdRental.accdb;Persist Security Info=False;"
    Anyone throw me a bone here? I'm sure I've messed up terminology a little bit but I've never worked ole, ADO, and at that never even attempted runtime connections.
    Abrium
    Asking the beginners questions so you don't have to!
    If by chance hell actually froze over and I some how helped you... Please rate.

  2. #2

    Thread Starter
    Addicted Member Abrium's Avatar
    Join Date
    Feb 2007
    Location
    The Great State of Texas
    Posts
    205

    Re: ADO Runtime Problem

    Nm, solved it. Damn dirty table names!
    Abrium
    Asking the beginners questions so you don't have to!
    If by chance hell actually froze over and I some how helped you... Please rate.

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