-
Junior Member
Fetch the details about particular person from database
I want to fetch the details about particular person from database by giving input in VB.
For eg, If i give a name like 'Susi' in textbox of vb, it should fetch and display the corresponding details from database to VB.
Can you just clarrify my doubts as soon as possible.
-
Contributing Member
Re: Fetch the details about particular person from database
I am sending one example code for u just try that it will work...first import the System.data.sqlclient
1. Place one textbox and one datagrid in form
2. Dim cn as new SqlConnection("connection string")
Dim da as new SqlDataAdapter("select * from tablename where columname='TextBox1.Text' ",cn)
Dim ds as new DataSet
da.fill(ds,"tablename")
DataGrid1.DataSource=ds.tables("tablename")
I hope it will work if not give me a reply and post what errors u r getting.......
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules