best databind way for a simple c# app and sql express.

G

garyusenet

I have a small app.

it's one form.

it's has a number of controls.

So far i've managed to create a new database in the product. An SQL
database.
I've also figured out how to create a table and have merrily created
one.

Now the function of my app is to add records to this database.

I want to do the following can someone point me in the right direction?
As I don't know how to proceed from here.

- Connect two controls from the form to the database.
1. Customer Name.
2. Origin of enquiry (a dropdown box)

When the app is run it should create a new record in the database. The
person entering the data then enters customer name in textbox1 and
selects the origin of enquiry from a dropdown list box.

The only extra thing i need to do is get the textbox1 control (customer
name control) predict the name of the customer by checking the database
for names which are simmilar. This is to try and make it clear to the
operator if the customer is allready in the database.

A quick example.
Monday. Customer name: Henry Smith is added to the database. His
origin of enquiry is (he saw us in a newspaper).
Tuesday. Henry smith calls back and the operator thinks he is a new
customer so fires up the new customer app. and starts to key his name
in as a new customer.

Customer Name: He (after typing in He, the text box suggests Henry
Smith as the right name) - so basically i want to add a kind of
intellisense.

So how do i do it?
this is my next step implementing some simple database functionality,
but Im a bit stumped.

a. How do i connect my newly created database to my controls?

b. How do i tell my app that the form is only for adding new customers,
and not browsing existing ones?

c. How do I add that intelisense functionality?


Please if you know the answers to any of the above, let me know!

Thanks!
Gary.
 
G

garyusenet

Thanks for your reply.

a)my app is a windowapp.
b) I mean the only way i've seen of databinding before was by dragging
the table onto the form, which creates a toolbar at the top and when
you open the form you can browse through records. As all I want to do
is add records I dont want this browse ability. What's more I've
already designed my form so don't want to simply drag the table onto
the form. Although dragging the table to the form was a nice quick
trick, it left me with no understanding of how the data in the database
is actually connected to the controls.
c) it's not a webapp... any other suggestions for a windows form? !

Thank you for your valuable time.

Gary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top