Thread: Listing 12-13
View Single Post
  #3 (permalink)  
Old March 4th, 2006, 04:29 PM
kai kai is offline
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by devinrader
 Posting a little more info about the error your seeing would be extremely helpful.

Devin
Hi,Devin
 On line 3: SqlAsyncResult ASyncResult;
  SqlAsyncResult is not a valid class name, I replaced it with "IAsyncResult" in line 3 and in

"public void CBMethod(SQLAsyncResult ar)"

still does not run. I added "Asyncronous Precessing=True" in the connection string>

Error is:

Server Error in '/CS' Application.
--------------------------------------------------------------------------------

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0103: The name 'AsyncResult' does not exist in the current context

Source Error:



Line 31:
Line 32: // Starting the asynchronous processing
Line 33: AsyncResult = Command.BeginExecuteReader(new AsyncCallback(CBMethod),
Line 34: CommandBehavior.CloseConnection);
Line 35: }


Source File: c:\Microsoft Press\Pro ASP.NET2.0 Wrox\Chapter 12\CS\Listing 12-13.aspx Line: 33

Please help, I have been strugglling with this example. When I search the Web, I tried more ten Asyn Callback in ASP.NET 2.0, they don't work.

I am using your ASP.NET 2.0 book for my Advanced ASP.NET programming class this term, it is an excellent book.

Kai