i am using it with vb.net language
i had do the code .. and it is returning the result in a textbox right now
cause i don't know how to returned it in a gridview ..
i tired to read and follow but i could not ..
i had a ready function named (QuerySelect) for the connection with the server .. now i use it like that :
Expand|Select|Wrap|Line Numbers
- Protected Sub btngo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btngo.Click
- Dim dt As Data.DataTable
- Dim query As String
- query = "SELECT vehicleregNo FROM [montrealTransactions]WHERE MONTH(RentedOn) = '" _
- & ddlmonth.SelectedValue & "' AND year(RentedOn) = '" & ddlyear.SelectedValue & "'"
- dt = DB.QuerySelect(query)
- If dt.Rows.Count > 0 Then
- With dt.Rows(0)
- Dim d As String = .Item("vehicleregNo")
- txtNo.Text = (d)
- End With
- Exit Sub
- End If
- End Sub
thanx alot :)