Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When does datasource reissue a select
Message
De
20/06/2008 12:40:47
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01325539
Message ID:
01325792
Vues:
12
Its possible the data is cached and that is the problem. My initial question was how to reissue the select. Session("CurrentList") is an integer that defines records that are wanted. (See the first line of the code section.) Its a contacts database with a single table that records the members of each mailling list or group via their personID and the List_id .


>What is sql += " WHERE list_members.list_id =" & Session("CurrentList").ToString
>
>And also may be data are cached?
>
>>Hi Naomi, I'm not quite sure what you are suggesting. The select statement for the datasource is not changeing, only the result because after the insert there is an additional record that meets the criteria. This is the SELECT statement.
>>
>> Protected Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
>>        Session("CurrentList") = ListBox1.SelectedValue
>>        Dim sql As String
>>        sql = "SELECT list_members.list_id, list_members.personid, "
>>        sql += " list_members.persontag, maillist.lname, "
>>        sql += " maillist.fname + maillist.middle + maillist.lname + maillist.suffix + ', ' + maillist.company AS name"
>>        sql += " FROM list_members "
>>        sql += " LEFT JOIN maillist ON list_members.personID = maillist.personID "
>>        sql += " WHERE list_members.list_id =" & Session("CurrentList").ToString
>>        sql += " ORDER BY lname"
>>        SqlDataSource3.SelectCommand = sql
>>        lblOwner.Text = ListBox1.SelectedValue
>>    End Sub
>>
>>The user makes a choice in Listbox1 that controls the contents of Listbox3 via the above code. (Note the reset of the SelectCommand.) So I really don't need to return a value from the new record. I just need to make sure its included in the selection set.
>>
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform