Error: Value of type 'System.Data.CommandBehavior' cannot be converted to 'System.IAsyncResult'.


I wrote this code to retrieve data from the database using autocomplete extender control. 

Dim Dr As SqlDataReader
Dim RtData As List(Of String) = New List(Of String)

Dr = MysqlCmd.EndExecuteReader(Data.CommandBehavior.CloseConnection)

While Dr.Read()


End While


Plz Help!







4/20/2009 12:22:26 PM 17816 articles. 1 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 43
Get it on Google Play
Get it on Apple App Store

The EndExecuteReader does not take a CommandBehavior.  The BeginExecuteReader does.  Please follow the example on the MSDN documentation:

Darrell Norton, MVP
Darrell Norton's Blog

Please mark this post as answered if it helped you!
4/20/2009 12:52:55 PM


thanks 4 ur quick reply.

i am new comer to ajax.


i say let AJAX give a chance for .NET. 

wish u success


4/20/2009 1:24:39 PM

Similar Artilces:

Value of type 'System.Net.Mail.MailMessage' cannot be converted to 'System.Net.Mail.AlternateView'
Trying to create an alternateview to send a txt email with the html formatted email.  I've used string builder to create the whole email, but I get this error.  Any ideas why?  i've bolded the line that throws the error... Dim EmailBodyTxt As New StringBuilder EmailBodyTxt.Append("<html><style type='text/css'>.table{border:solid; border-color:#006666; width:600;} ")EmailBodyTxt.Append("<body><table class='table'><tr><td colspan='2'><h1>Test<br />RESPONSE SYSTEM</h1></td>...

Error : Value of type 'System.Data.DataTable' cannot be converted to 'String'
Hi, I have a compilation error : Value of type 'System.Data.DataTable' cannot be converted to 'String'. I want to erase all the records in my Access database and update it with a DataTable. My code lines : Dim conn As OleDbConnection Dim da As OleDbDataAdapter Dim ds As DataSet Dim sql As String sql = "SELECT * FROM menu;" conn = New OleDbConnection( "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=d:\www\tgc\prof_tech\fsthilaire\parametres_site\parametres_site.mdb" ) da = New OleDbDataAdapter(sql, conn) conn.Open() ds = New DataS...

convert type 'System.Data.DataSet' to 'System.Data.DataTable'
 I got this error  : Cannot implicitly convert type 'System.Data.DataSet' to 'System.Data.DataTable' i have written code like thisDataTable dt = new DataTable(); dt = GetGalleryImages(name); Possibly coz GetGalleryImages returns a dataset and not a datatable? Try: DataSet ds = GetGalleryImages(name); what type does GetGalleryImages return?  If this returns a dataset then you will have to change datatable to dataset, then index the table of the dataset.Please mark as answer if you find helpful.Ustes G....

Linq Error Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<AnonymousType#1>' to 'System.Data.EnumerableRowCollection<System.Data.DataRow>'.
Hi I am using a AdventureWorks database and trying to use LINQ to query the data. i am not able to get the AsDataView() if i don't declare query as EnumerableRowCollection. But if i declare the query EnumerableRowCollection it shows me an error Cannot implicitly convert type 'System.Collections.Generic.IEnumerable' to 'System.Data.EnumerableRowCollection'. AdventureWorks.AdventureWorksDataContext db = new AdventureWorks.AdventureWorksDataContext(); EnumerableRowCollection query = from t in db.TransactionHistories.AsEnumerable() ...

System.Net.Mail is giving error CS0029: Cannot implicitly convert type 'string' to 'System.Net.Mail.MailAddress'
I'm getting an error while trying to use the wizard to create a form and than pass it the vaibles to Mail. Any help would be much appreciated. SmtpClient smtpClient = new SmtpClient(); MailMessage message = new MailMessage(); try {   message.From = txtEmail.Text; message.To.Add(""); message.Subject = "Feedback"; message.CC.Add(""); message.CC.Add(""); message.IsBodyHtml = false; message.Body = txtMessage.Text; smtpClient.Send(message); lblStatus.Text = "Email successfully sent."; } catch (Exception ex) { lbl...

Cannot implicitly convert type 'System.Data.DataTable' to 'System.Data.Dataset'
I am using an excel spreadsheet as a data source to build a dataset which is then used to populate a grid:  I am getting the following error: Cannot implicitly convert type 'System.Data.DataTable' to 'System.Data.Dataset' Here's my code:private DataSet GetData(String description, String mpnumber, String link) { //MPData will represents the Data in Application Cache. We will use Cache Data //for performance purposes, because MP Information will not change often. I choose // to also use Dataset Filtering instead of SQL Server Filtering. However the DataAccess l...

Error: foreach statement cannot operate on variables of type 'System.Data.DataSet' because 'System.Data.DataSet' does not contain a definition for 'GetEnumerator', or it is inaccessible
I am getting error on this line DataSet dsdata=new DataSet(); SQL="Seelct * from tablename"; //dsdata contains result of the above query foreach(DataRow dr in dsdata) //This line gives error Error: foreach statement cannot operate on variables of type 'System.Data.DataSet' because 'System.Data.DataSet' does not contain a definition for 'GetEnumerator', or it is inaccessible DataSet dsdata=new DataSet(); SQL="Select * from tablename"; //dsdata contains result of the above query foreach(DataRow dr in dsdata.Tables[0].Rows) //This ...

Cannot convert value of parameter 'Course_FK' from 'System.String' to 'System.Guid'
Hi, I'm building a site and I've been trying to accomplish something similar to what is talked about in "Working with Data in ASP.NET 2.0 :: Declarative Parameters" tutorial. Below is the code for my methods from the xsd. I tried to attach a screenshot of my xsd but for some reason I'm not allowed GetAllCourseNames() SELECT        CourseID, NameFROM            Course GetCourseScheduleByCourseID SELECT        ScheduleID, Course_FK, Date, TeeTime, NumberOfPlayersF...

Value of type 'System.Data.Dataset' cannot be converted to 'String'
I receive the above error for line 57 which is: Address.text = Clientinfo(DropDownlist1.Items(DropDownList1.SelectedIndex).text) I'm trying to take the selected item from the dropdownlist1 and have the data from the query 'Clientinfo' appear using the label control called 'address'. I plan to format it to be used as a mailing address: 123 Street City, State Zip Etc. Obviously I am learning as I go. Can anyone give me an alternative or find my error. Much appreciated. The code is below: Sub Page_Load(Sender As Object, E As EventArgs) If Not Page.IsPostBa...

c:\inetpub\wwwroot\WebApplication1\subject_info.aspx.vb(658): Value of type '1-dimensional array of System.Data.DataRow' cannot be converted to 'System.Data.DataRow'.
Hi everyone, I have a "select link" in one of the fields in the DataGrid. I want it retreive informations when i click on that link and display in the text box so i can modify data. The problem is i always have this error when i COMPILE: " Value of type '1-dimensional array of System.Data.DataRow' cannot be converted to 'System.Data.DataRow' ". Here's is my code: ************************************************ Private Sub UpdateDetails(ByVal uSubjectID As String) DaLecturer1 = Session("ds") Dim dt As DataTable = DaLectur...

convert type 'System.Xml.XmlDataDocument' to 'System.Data.DataSet'
I am using XMLDataDocument in web services which returns XMLDataDocument using this XMLDataDocument for Dataset in application getting error Cannot implicitly convert type 'System.Xml.XmlDataDocument' to 'System.Data.DataSet'  any idea  XmlDataDocument has DataSet property to get the document as a data set.Thanks,Teemu KeiskiFinland, EU  [WebMethod]    public XMLDataDocument xmldoc(DateTime x, DateTime y)    {        df = dateFrom;        dt = dateTo;   &...

'TypeConverter' is unable to convert 'System.Data.SqlClient.SqlConnection' to 'System.Data.SqlClient.SqlConnection'.
Hey, I was hoping someone could shed some light on this error for me. I am using the TypeConverter in the System.ComponentsModel Namespace, and when I attempt to take an object, which in this case is a SQLConnection, and perform a TypeConvert (code example below) I get the following error: Error: ---------------------------------------------------------------------------- 'TypeConverter' is unable to convert 'System.Data.SqlClient.SqlConnection' to 'System.Data.SqlClient.SqlConnection'. ---------------------------------------------------------------------------- ...

Value of type 'String' cannot be converted to 'System.Net.Mail.MailAddress'
My code is below:Protected Sub btnSendMsg_OnClick(ByVal Source As Object, ByVal E As EventArgs) Dim myMessage As New System.Net.Mail.MailMessage Dim myAttachment As System.Net.Mail.Attachment Dim myMail As System.Net.Mail.SmtpClient If Page.IsValid() Then myMessage.From = txtFromEmail.Text myMessage.To = txtToEmail.TextWhat can I do to fix this? MailMessage.To represents a collection that you Add addresses to.Dim recipient As MailAddress= new MailAddress(txtToEmail.Text) myMessage.To.Add(recipient)    Mike Banavige~~~~~~~~~~...

Value of type 'Integer' cannot be converted to 'System.Data.SqlClient.SqlDataReader'
Value of type 'Integer' cannot be converted to 'System.Data.SqlClient.SqlDataReader' I get the above error when I try to do this code: Dim dr As SqlDataReaderDim ID As Integer dr = oDeveloper.GetDeveloper(CllrID) anyone any ideas around this? macca   well obviously, GetDeveloper Takes a DataReader What do you mean Jeffrey? How can I get the values from GetDeveloper to my datareader dr then? macca Enable Strict for your project.  That will tell you exactly what's wrong. I think the error message already says what is wrong.If you haven't got a clue about something don...

Web resources about - Error: Value of type 'System.Data.CommandBehavior' cannot be converted to 'System.IAsyncResult'. -

Resources last updated: 12/1/2015 10:49:20 AM