Results 1 to 3 of 3

Thread: error in dataset fill init

  1. #1

    Thread Starter
    Addicted Member Tjoppie's Avatar
    Join Date
    Aug 2005
    Location
    South Africa
    Posts
    241

    Question error in dataset fill init

    Hi all,

    I've got a problem with a dataset fill.

    My application uses an odbc connection to connect to sql server and extract records.

    The error I get is the following:

    The select command property has not been initialized before calling fill.

    but my initialization code is the following:

    VB Code:
    1. CType(Me.OdbcNetDataset, System.ComponentModel.ISupportInitialize).BeginInit()
    2.         CType(Me.OdbcEmailAgentDataset, System.ComponentModel.ISupportInitialize).BeginInit()
    3.         CType(Me.OdbcEmailDataset, System.ComponentModel.ISupportInitialize).BeginInit()
    4.         CType(Me.EmailDataset, System.ComponentModel.ISupportInitialize).BeginInit()
    5.         CType(Me.EmailAgentDataset, System.ComponentModel.ISupportInitialize).BeginInit()
    6.         CType(Me.NetDataset1, System.ComponentModel.ISupportInitialize).BeginInit()

    What could be my error?

    Thanks

  2. #2
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    Re: error in dataset fill init

    Use the System.Data.SqlClient namespace to connect to sql server and add a try catch block to get a precise error message and what line is causing the error...

    Regards
    Jorge
    "The dark side clouds everything. Impossible to see the future is."

  3. #3
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: error in dataset fill init

    Is there any reason you are using ODBC connection instead of a SQL Connection.

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