| | |
regarding searching the sqldatabase using asp
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2009
Posts: 47
Reputation:
Solved Threads: 0
here i have to search the database according to serial no and show the information of that serial no
the problem here everything is fine and
the error is it is saying that default4 is not declared even i created it
if that is not the correct one then what is the correct one, plz help me thanks
the problem here everything is fine and
Dim a As String
Dim b As Boolean
Dim dr As SqlDataReader
Dim ConnStr As String
ConnStr = ConfigurationManager.ConnectionStrings("gate").ConnectionString()
Dim conn As New SqlConnection(ConnStr)
conn.Open()
Dim command As New SqlCommand("select * from visitors_pass", conn)
dr = command.ExecuteReader
b = False
a = Integer.Parse(TextBox1.Text)
While dr.Read()
If (a = dr(0)) Then
default4.label2.text = dr(0)
default4.label4.text = dr(1)
b = True
dr.Close()
conn.Close()
Response.Redirect("default4.aspx")
Exit While
End If
End While
MsgBox("enter the numeric value")
TextBox1.Focus()
b = True
If (b = False) Then
MsgBox("no data matching to this serial number is found")
End If
dr.Dispose()
conn.Dispose()
dr.Close()
conn.Close()
TextBox1.Text = ""
End Subif that is not the correct one then what is the correct one, plz help me thanks
![]() |
Similar Threads
- Searching Record with ASP.Net (ASP.NET)
- Hello (Community Introductions)
- Searching for work asp (Community Introductions)
- PHP vs ASP... the big ShOwdOwN (IT Professionals' Lounge)
- ASP Forum Software (Social Media and Online Communities)
Other Threads in the ASP.NET Forum
- Previous Thread: Contact form
- Next Thread: databinding one webform with another
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn cac checkbox child class click compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datagridviewcheckbox datalist deadlock deployment development dgv dialog dropdownmenu dynamic edit embeddingactivexcontrol feedback findcontrol flash flv form forms grid gridview homeedition hosting iframe iis image javascript jquery list menu mono mssql multistepregistration nameisnotdeclared novell objects order problem ratings rotatepage save search security serializesmo.table silverlight smartcard sql ssl suse textbox tracking treeview typeof unauthorized validatedate validation vb.net video view virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webdevelopment wizard xml





