i need some sample code on retrieving data from the database and put it in the form particulary in the groupbox..

we are doing a project study, text to voice translator..

when the user enter the word in the textbox and clicks the speak button, the english equivalent word of the input word is displayed in the groupbox...

how is it?

Recommended Answers

All 14 Replies

What do you mean by groupbox here?
A groupbox control is meant to group other controls, most of the time radiobuttons.

yah..that one...i am going to put there the english equivalent of the input word text...

Are you sure you mean GroupBox? Other than serving to group other controls (encompass, contain), and especially RadioButtons as ddanbe pointed out, I don't know how you would use a GroupBox the way you describe. Changing the GroupBox.Text is easy though: groupBox1.Text = "My GroupBox Text..."; As far as the database retrieval, more info is needed to direct you on how to do that, like: type of database (Access, Sql Server, SQLite, etc...); method of retrieval (SELECT *... or scaler query with WHERE condition, etc...). The basics steps for querying DB are:

1) Establish connection
2) Create a command
3) Execute command

but, there are specific classes for interfacing that functionality depending on the DB and type of query. You will find many examples of such data retrieval inside this forum.

ahmm okay..
but about the groupox...
my leader gave us the screenshot of our project that's why i am keep on mentioning that the english equivalent word of the other word that the user entered in the textbox will be displayed in the groupbox..the english word will be obtained in the database that was created...is it not possible?

ahmm okay..
but about the groupox...
my leader gave us the screenshot of our project that's why i am keep on mentioning that the english equivalent word of the other word that the user entered in the textbox will be displayed in the groupbox..the english word will be obtained in the database that was created...is it not possible?

Possible?--don't know what the screenshot looks like, but probably anything possible.... Can you attach the screenshot so we can see what you are talking about?

Possible?--don't know what the screenshot looks like, but probably anything possible.... Can you attach the screenshot so we can see what you are talking about?

sorry, but how can i attach it?

When you reply, click advanced and scroll down. You will notice a button Manage Attachements click on on it, click on Browse to select your picture, then click on the upload button.
Fill in your reply and click the Submit Reply button.

ok thanks...

here it is..

the user will enter a word in the textbox particularly Tagalog word for example 'aso' then, when he clicks the speak button the software will give the spoken form of the word then the english equivalent word will be displayed in the groupbox as 'aso-dog',something like that....

You can't display something in a GroupBox control. As DdoubleD already pointed out you can change the Text property. So you could change the phrase English equivalent into 'aso-dog' if you like.
Here I would use a combination of a Label and another TextBox.
I would set the following:
MyLabel.Text = "English equivalent:";
MyTextBox.Text = "'aso-dog";
but this is all up to you what you decide to do.

ahmm.okay..never mind the groupbox thing..
ahmm...it's like this...i have a database one for the tagalog words and one is for the english words(of the tagalog words)..
as what i said before the user will enter a tagalog word in the textbox then when he clicks the speak button the software will give the spoken form..
then in the form, the english equivalent of the tagalog word should be displayed..how is that?
it will be coming from the english database...
please help..i am not so familiar working with database using c#...=(

Sorry I'm not so fluent as it comes to databases. Perhaps start a search in C# forum search? You find it on the right side of the site window under RELATED FORUM FEATURES. Succes!
Or else, I know some nice guys over here who will gladly help you out:)

aww..so sad..hope they will..
thanks for the help..:)

You need to provide more information about the data retrieval you need. For starters, you should indicate:

1) type of DB (eg. Sql Server, MySQL, Access, etc.)
2) how you expect the data to be loaded into your program (entire table, single field, range of records, etc.)

If you already have some code where you are trying to achieve this, but need some assistance to get it working, include that code too (be sure to use CODE tags).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.