Monday, July 13, 2009

Vb.net 2005 search coding?

dbconnection.Open()


n = txtdconcode.Text


Try


dbcommand = New OleDbCommand("SELECT * FROM doctormaster WHERE Concode='" %26amp; n %26amp; "' ", dbconnection)





dbdatareader = dbcommand.ExecuteReader()





While (dbdatareader.Read())





' txtdconcode.Text = dbdatareader.GetValue(0)


txtdocname.Text = dbdatareader.GetValue(1)


combospeciality.Text = dbdatareader.GetValue(2)


txtcontactno.Text = dbdatareader.GetValue(3)


txtmobileno.Text = dbdatareader.GetValue(4)


txtaddress.Text = dbdatareader.GetValue(5)


txtrate.Text = dbdatareader.GetValue(6)


txtnoofpatient.Text = dbdatareader.GetValue(7)


End While


dbdatareader.Close()


dbconnection.Close()








Catch ex1 As Exception


MsgBox(ex1.Message)





dbconnection.Close()


CLEAR()


E

Vb.net 2005 search coding?
Hello,





I dont understand the question. Are you asking if this is efficient searching, or if you want another method of searching a Database, or if you are receiving an error upon build or runtime for this code. If you could edit this post and give a more detailed question I would be happy to help you out.





thanks


No comments:

Post a Comment