473,386 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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.

Mar 29 '06 #1
2 1459

a)Is your app an webapp or windowapp?
b)Dont implement the browse functionality?
c)For a webapp you could use AJAX for that (sample:
http://www.autosuggestbox.com/ )

Hope this helps.
<ga********@myway.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
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.

Mar 29 '06 #2
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.

Mar 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Daniel Pryde | last post by:
Hi everyone. I was wondering if anyone might be able to help me out here. I'm currently looking to find the quickest way to find a best fit match in a large array. My problem is that I have an...
9
by: Mike L | last post by:
I tried a sample of code in MSDN magazine, but now I'm stuck. What code has the best performance to populate a Data Grid with a SP? Below is the code I have, which might be completing the wrong...
14
by: 42 | last post by:
Hi, Stupid question: I keep bumping into the desire to create classes and properties with the same name and the current favored naming conventions aren't automatically differentiating them......
3
by: Marty McDonald | last post by:
I have <asp:Table... </asp:Table> on my webform. In codebehind, I populate a DataTable whose data should appear in the asp:Table. I created my own code to populate the asp:Table with the...
2
by: Andrew | last post by:
Hey all, Have a strange one here, and being still fairly new to .NET isn't helping me understand it. I am having a problem where a DataReader doesn't return all the rows when I try to use a...
2
by: kbutterly | last post by:
All, I have a menu which contains Category as the master and Product as the child. When I click on a Category in the menu, I want one formView control, fvpc, to show, and then when I click on...
1
by: Dunc | last post by:
Has anyone come across a way to bind simple properties (e.g. <%# DateTime.Now.Year %>, <%# UserName %in the underlying HTML) without doing a general DataBind(); call? Not only does it seem a...
0
by: murfu | last post by:
I have a formview that has a dropdownlist bound to a table to populate a list of people. While in edit mode, if a person is not in that list, there is a button that pops up an add requester page...
3
by: =?ISO-8859-1?Q?S=E9bastien_de_Mapias?= | last post by:
Good day, To people well acquainted with XML schemas manipulation here, how do you express relationships/references between elements ? Take the following excerpt from one of the analysts around...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.