none
Beginner Question - OleDbDataAdapter not recognized by VS 2008 Express RRS feed

  • Question

  • I've read about data connections and such, and I'm trying to take my ADODB.Recordset and dump it into an OleDbDataAdapter to fill a DataSet to link to a DataGridView control.

     

    The problem is that I can't even declare my adapter variable because VS 2008 Express doesn't seem to recognize "OleDbDataAdapter". I've tried loading reference libraries and such, but no luck. Is Express limited in this way? What am I doing wrong?

    Thursday, June 12, 2008 3:44 PM

Answers

  • Are you using VB? I use VB 2005, but I'll make a suggestion anyway. Did you try putting an "Imports System.Data.OleDb" declaration before the Class declaration, as in...

    Code Snippet

     

    Imports System.Data.OleDb

    Public Class Form1

     

    End Class

     

     

    Thursday, June 12, 2008 10:14 PM

All replies

  • I found a workaround...

     

    I was able to add it to the toolbar and drag it on top of the form, which created the object in the project. I still have no idea why I can't declare it using code only, but at least I can get my ADODB.RecordSet into my DataGridView object.

    Thursday, June 12, 2008 6:29 PM
  • Are you using VB? I use VB 2005, but I'll make a suggestion anyway. Did you try putting an "Imports System.Data.OleDb" declaration before the Class declaration, as in...

    Code Snippet

     

    Imports System.Data.OleDb

    Public Class Form1

     

    End Class

     

     

    Thursday, June 12, 2008 10:14 PM
  • Perfect. I knew it would be simple, thanks for posting!

    Monday, June 16, 2008 3:49 PM