Thread: Listing 12-13
View Single Post
  #7 (permalink)  
Old July 21st, 2006, 07:18 AM
monfu monfu is offline
Authorized User
 
Join Date: Nov 2005
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi hardysmith

I tried your code, but i got the following compilation error:-

Unable to cast object of type 'System.Data.CommandBehavior' to type 'System.Data.SqlClient.SqlCommand'.

The error is here:-

SqlCommand command = (SqlCommand)result.AsyncState;
SqlDataReader dr = command.EndExecuteReader(result);

Any help?
Reply With Quote