Results 1 to 3 of 3

Thread: Command object

  1. #1

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    Command object

    Hi,

    I have a command objec which I use to return a datareader object. Then I want to use the same command object to update a table in my database.

    However, when I try to change the commandtext property I receive the following error:

    The OleDbCommand is currently busy Open, Fetching.

    Any ideas why??

    thanks,
    Don't anthropomorphize computers -- they hate it

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Because DataReader is a forward only reading of the database and keeps the connection busy waiting for .Read.

    you need to close the DataReader.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950
    doh.
    Don't anthropomorphize computers -- they hate it

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