none
call Fill by another thread : Connection property has not been initialized RRS feed

  • Question

  • Dear all,

    if I try to fill a dataset in the main thread my code  works fine.

    Using the same function starting another thread , i get : Connection property has not been initialized error.

     

    Do you have any idea ?

     

    Regards

    Tuesday, September 27, 2011 3:46 PM

All replies

  • No ideas until you post some code to show us what you're doing.  ;0)
    ~~Bonnie Berent [C# MVP]

    geek-goddess-bonnie.blogspot.com
    Wednesday, September 28, 2011 1:16 AM
  • The problem is that I am using a legacy class to fill the dataset. But it does the usual operations : - Open a connection - create a data adapter - for each table in the daset , it calls the Fill method. Someone told me that "It looks like you are opening a non-context connection"... Thanks
    Wednesday, September 28, 2011 7:24 AM
  • And what would be the problem with a non-context connection (whatever that means)? I still think we need to see some code.


    ~~Bonnie Berent [C# MVP]

    geek-goddess-bonnie.blogspot.com
    Wednesday, September 28, 2011 3:23 PM
  • Hi,

    I am writing to check the status of the issue on your side. Would you mind letting us know the result of the suggestions?

    If you need further assistance, please feel free to let me know. I will be more than happy to be of assistance.

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, October 3, 2011 7:36 AM
    Moderator