Search in Data Base

muhammadanzar

Member
Joined
Dec 25, 2005
Messages
18
Programming Experience
Beginner
Respected sir,
i want to search in the data base who can i do that my table have two columns A_id, A_name. search on number and on text as well
 
Hi, If you are talking about retrieving records from a database then you would need an SQL command. Something like...

VB.NET:
Dim DbCommand as new oledbcommand(SELECT * FROM 'YourTableName' WHERE A_id = ? AND A_Name = ?",yourconnection)
dbcommand.parameters.add("@A_id",oledbtype.integer,0,"A_Id").Value = 'TheValueToSearch'
DbCommand.parameter.add("@A_NAme",oledbtype.varwchar,50,"A_Name").Value = 'TheOtherValueToSearch'
 
This is a pretty general data access question. I'd suggest some general reading on using ADO.NET to improve your overall understanding. See TechGnome's signature for some links to ADO.NET tutorials or see my signature for some tutorials that have ADO.NET sections.
 
Back
Top