help!!!

Alexbanu

New Member
&nbsp;<BR>Below is my procedure:<BR><BR>Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<BR> Dim Clicked_Date As Date = Request.QueryString("Date")<BR> Dim UserName As String = Request.Cookies("name").Value<BR> Dim myConnection As New OleDbConnection("Provider=SQLOLEDB;data source=localhost;initial catalog=Idealnet;UID=sa;pwd=;")<BR> Dim myCommand As New OleDbDataAdapter("Select * from Calendar where UserName= '" & UserName & "'", myConnection)<BR> Dim ds As DataSet = New DataSet()<BR> myCommand.Fill(ds, "Calendar")<BR> DataList1.DataSource = ds.Tables("Calendar").DefaultView<BR> Response.Write(DataList1.DataSource)<BR> DataBind()<BR> myConnection.Close()<BR> End Sub<BR><BR>Help: <BR>Instead of binding the data, I want each record to be retrieved one by one.This is because, I want to make a check whether my clicked_date = each record. How can I do that?<BR><BR>thx <BR>Philip<BR>Hmmm,<BR><BR>I'm not too sure what you're trying to do but if you want to run a check on each record one by one if clicked_date = record why don't you just put the condition in your query?<BR><BR>i.e Select * from Calendar where username = username and theDate = '" & Clicked_Date & "'" ??<BR>
 
Back
Top