Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BeginExecuteNonQuery

Status
Not open for further replies.

HomerJS

Programmer
Jun 25, 2001
86
0
0
US
I am using vb.net 2003 and want to display a progress bar while a form loads. I am trying to use async call using the BeginExecuteNonQuery method to do this. However I cannot find how to get to the BeginExecuteNonQuery method.

Does anyone know where I can find the method? Or another/better way to display a progress bar while a form loads?
 
It's a method of the SqlCommand object in namespace System.Data.SqlClient.

You must be running on a very slow machine or loading an enormous amount of data to need a progress bar!



Bob Boffin
 
I cannot find the method under system.data.sqlclient. It does not show up in intellisense and even when I enter the method it returns an error. Is there a reference I am missing? I do have version 2.81.1117 of MDAC.
 
Works fine for me...
Code:
        Dim myCommand As New System.Data.SqlClient.SqlCommand
        myCommand.BeginExecuteNonQuery()




____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
When I try the code ca8msm posted, I get the error: 'beginexecutereader' is not a member of 'System.Data.SqlClient.SqlCommand'.

Reading other articles on the web it does work in .net 2005, however I am using .net 2003. The BeginExecuteNonQuery, and other asynchronous methods, come with ADO 2.0. Is there something extra that needs to be referenced? Can it even be done in .net 2003? Please help so I can stop banging my head against the wall.

 
It's not available in versions prior to 2.0 of the framework...


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top