ORDER BY clause

tehon3299

Well-known member
Joined
Jan 6, 2003
Messages
155
Location
Liverpool, NY
I am trying to order by rows in DESC order. tmTransactions has ID, GUID, Date, Description, Withdrawl, Deposit, and Total in the table. It is sorting by Total for some reason. Any ideas???

Code:
			MyConnection = New SqlConnection("server=localhost;database=checking;Trusted_Connection=yes")
			SQL="SELECT * FROM tmTransactions WHERE UserRecord = " & user & " ORDER BY Date DESC"
			MyCommand = New SqlDataAdapter(SQL, MyConnection)
			ds = New DataSet()
			MyCommand.Fill(ds, "Sessions")
			DGrid.DataSource=ds.Tables("Sessions").DefaultView
			DGrid.DataBind()
 
Back
Top