How to search through access database and display entire row in text boxes
How can I search through an access database using
SELECT*FROM [TableName] WHERE [FieldName] = textbox1.text
Is there a way I can call the row number in order to return other fields from that row into textboxes? Any help would be greatly appreciated!:ehh:
Re: How to search through access database and display entire row in text boxes
Welcome to VBForums :wave:
How you do it depends on several things, most important of which is the language you are using.
From your profile it seems that you are using VB2008, so I would recommend the "ADO.Net Tutorial" at the top of the VB.Net section of our Database Development FAQs/Tutorials (at the top of this forum)
That covers most of what you need to know, and may be enough for you - if not, you will at least be able to ask for more specific help.
1 Attachment(s)
Re: How to search through access database and display entire row in text boxes
Well I am using VB2008 and I have most of what the tutorial says down but I don't know how to display the information i record in the DataSet using an ID.
I am filling a DataSet with the information retrieved from this statement: SELECT * FROM [TABLE] WHERE [FIELD] = TEXTBOX1.TEXT
I need it to return the row number that this information is found so that I can populate text boxes using this statement: Textbox2.text = ds2.tables("Workorders2").Rows(I need this number!!!!).Item(0)
That way i can populate the textboxes with the rest of the information from that row.
So to recap, I want to search using the WorkOrder number then retrieve the row in which the number is found so I can populate the rest of the textboxes using that row number. Hope it makes sense!!!!! and I realllly need help. :(