?
Solved

VB.Net Access Search

Posted on 2004-04-16
10
Medium Priority
?
268 Views
Last Modified: 2010-04-24
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
0
Comment
Question by:linkkoh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 2

Expert Comment

by:nibirkhan
ID: 10847177
SQL Statement should be

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.

0
 
LVL 2

Author Comment

by:linkkoh
ID: 10847363
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.
0
 
LVL 2

Author Comment

by:linkkoh
ID: 10848032
I found my answer by myself, Please cancel this threat
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

Expert Comment

by:nibirkhan
ID: 10854815
ask the community support to do that...meanwhile could you please share it with us how did you do it??

thanks
0
 
LVL 2

Author Comment

by:linkkoh
ID: 10855929
Me.CustomerData.Clear()

Me.OleDbDataAdapter1.SelectCommand.CommandText = "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(CustomerData)

Me.DataGrid1.Refresh()

CustomerData being the DataSet
0
 
LVL 2

Expert Comment

by:nibirkhan
ID: 10863688
cool...community support can clean this thread up..I have no complain....or urged for  credits..

nibirkhan
0
 
LVL 2

Author Comment

by:linkkoh
ID: 10864075
How do i contact community support?
0
 
LVL 2

Expert Comment

by:nibirkhan
ID: 10864179
http://www.experts-exchange.com/Community_Support/

( I have answered your question..so, now you need to give me points..kidding..)
0
 
LVL 2

Author Comment

by:linkkoh
ID: 10864460
0
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
ID: 10872059
PAQd, 50 points refunded.

GhostMod
Community Support Moderator
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question