linkkoh
asked on
VB.Net Access Search
I need some help getting started. I created a connection to a Access DataBase, I was able to import the Data onto a DataGrid Easily. Now I have to make a search that will search for names, ID's and such... One problem i have is that the Table Field names are "Customer ID" or "Contact Name" which have spaces in them. How do I handle those?
My options that I see are either the DataView or use a OleDBCommand what are the syntax for using those? so i can filter out the ones I do not need. I also want to be able to use WildCards to search partial properties.
I'm not looking for a full solution really just some help to get started or Links to websites where i can read up on it
My options that I see are either the DataView or use a OleDBCommand what are the syntax for using those? so i can filter out the ones I do not need. I also want to be able to use WildCards to search partial properties.
I'm not looking for a full solution really just some help to get started or Links to websites where i can read up on it
ASKER
That code will probilby work for SQL and ASP Pages. But I am looking for a Strictly VB.NET Application. I did try it that way, but it didn't do anything.
ASKER
I found my answer by myself, Please cancel this threat
ask the community support to do that...meanwhile could you please share it with us how did you do it??
thanks
thanks
ASKER
Me.CustomerData.Clear()
Me.OleDbDataAdapter1.Selec tCommand.C ommandText = "SELECT [Customer ID], [Customer Name], [Contact Title], [Contact First Name], [Contact Last Name], [Contact Position], [E-mail], Phone FROM [Customer] where [Customer Name] Like '%" & TextBox1.Text & "%'"
Me.OleDbDataAdapter1.Fill( CustomerDa ta)
Me.DataGrid1.Refresh()
CustomerData being the DataSet
Me.OleDbDataAdapter1.Selec
Me.OleDbDataAdapter1.Fill(
Me.DataGrid1.Refresh()
CustomerData being the DataSet
cool...community support can clean this thread up..I have no complain....or urged for credits..
nibirkhan
nibirkhan
ASKER
How do i contact community support?
https://www.experts-exchange.com/Community_Support/
( I have answered your question..so, now you need to give me points..kidding..)
( I have answered your question..so, now you need to give me points..kidding..)
ASKER
Hehe, i answered my own question again
https://www.experts-exchange.com/questions/20959687/Refund-for-Question-Self-Answered.html
lol
https://www.experts-exchange.com/questions/20959687/Refund-for-Question-Self-Answered.html
lol
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Suppose you are searching by "Customer ID"
--------------------------
Select [Customer ID], [Contact Name]
FROM TableName
WHERE ( [Customer ID] = ? )
"?" will work as the parameter from the forms field.