problem with requesting

M

Marek

I have a simple page - 4 textboxes and 1 datagrid.
I'm trying to return functionaliy of my webpage.
Textboxes gives parameters to sqlquery.
I'm trying to have "press enter and it will fill datagrid".
Before i done something with code it worked like i want.
Can someone help me?


numer = TextBox1.Text
osoba = TextBox2.Text
opis = TextBox3.Text
rozwiazanie = TextBox4.Text
Const sConnection As String = "Persist Security Info=False;
Integrated Security=SSPI; Database=Zgloszenia; server=K3-APP; Connect
Timeout=30"
Dim objConn As New System.Data.SqlClient.SqlConnection(sConnection)
Dim sSQL As String = "SELECT * FROM CALLS WHERE CALLNUMBER LIKE '%"
& numer & "' AND OPENEDBY LIKE '%" & osoba & "' AND DESCRIPTIO LIKE '%" &
opis & "' AND RESOLUTION LIKE '%" & rozwiazanie & "'"
Dim objDataAdapter As New SqlClient.SqlDataAdapter(sSQL, objConn)
Dim objDS As New DataSet("CALLS")
objDataAdapter.Fill(objDS, "CALLS")
DataGrid1.DataSource = objDS.Tables("CALLS")
DataGrid1.DataBind()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top