|
i have to fill SQl 2000 tables from window forms the problem is when filling the 1st table i load the database table in a datset in the form load event now when filling the second table what will be the possible event to fire that it load the second table in the datset
sas
|
|
|
|
|
I think its not clear what you exactly need. I am sorry at least for me, its not clear. Would you like to explain please ?
|
|
|
|
|
sir the problem is i am working on a HR database u have worked on web forms the application consists of 4 forms every form is associated with two tables in sql2000 the question is that when the user open the application in the form load event i kept the dataset filling method for the first table now when user switch on to the next table what will be the event to load the second datatable in the datset
sas
|
|
|
|
|
well sorry to say dear Sajid, you've failed to describe your problem. HOW?
1st of all, you are talking about the FORMS of the application, on other hand you are talking about switching to next TABLE
I think there is no any TABLE control in C#.NET.
If you are talking about FORMS, talk about the controls on the form.
So now I am asking, as you said, every form is associated with two tables, How these 2 tables you are displaying on the form? i mean which controls you are using to display the data of the Table ?
This way we can know and figure out what events are available for that control. NOT THE TABLE..
I hope now you understand what I mean to clearify
Regards
|
|
|
|
|
hi.
I am writing a program with c# and sql as database.
i have a MDIform as startup form which one of my form(frmMain) opens with it.
in frmMain i have a combobox which is filled with data from CityTable. it means that I used Value Member and Display Member to fill it.
when I press the button "Add City" on MDIform another form opens and i can add a new city.
the frmMain still is open.
my problem is here how can I update city Combo box in frmMain?
please help me.
i have asked from a few persons and they gave 2 solutions :
1-raise an event
2-open City From using showDialog()
now please tell which one to choose and how?
|
|
|
|
|
As per my knowledge, Do this.
Make the data source(Table containing the Cities) of Combobox, publicly accessible by declaring in the mainForm a static propertly which return the data table of cities.
In the dialog box, where you add new record, access the data table of mainForm and add city in it. It'll automatically shown in combo box because its already bound to that table.
Regards
|
|
|
|
|
thanx for answer
appreciate
|
|
|
|
|
Since C# 3.0 natively supports LINQ in the language wouldn't that make the ADO.NET stuff part of the CLR and BCL?
|
|
|
|
|
Why would LINQ change ADO.NET ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi there,
I have a stored procedure written on a RichTextBox. On the click of a button, this stored procedure should be executed and errors, if any, should be displayed in a messagebox.
Thanks in advance!
|
|
|
|
|
Hi!
You can access the text in the RTB via its Text property (I can't see what else this has to do with the topic).
To execute a SP with a given name you can use classes from the System.Data.* namespace, depending on the RDBMS you want to use, for example the SqlCommand class.
There's a ton of samples for this on MSDN for example, try googling for it if you still have troubles.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Thanks mav,
Currently I am using this option. The problem is that SqlCommand class can handle only one SQL command at time. What I need is to send an entire SP, execute it and after the whole SP is executed in "one go";
1. If successful, a message box saying "Successful Execution" should be displayed; else,
2. Whatever exception has been returned, that needs to be displayed.
|
|
|
|
|
You can't "send an entire SP". A SP is something stored within the DB (hence the name). You _could_ execute an SQL command containing something like "CREATE PROCEDURE ..." to create a SP on-the-fly, but I think that's not a good solution.
If you have several queries you have to execute together, then the SP should be available in the DB, not be created everytime, IMO.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
the Pronblem is i have a table of employeeinfo having attribuyes
EmpID
EmpName
EmpFatherName
GenID
now GenID is a primary key of a separate table having two attributes that is
GenID
Gender
the problem is when the form runs displaying 3 textboxes and one combobox the user must select the entry from gender and click save the values must be stored in the table of sql that is Employeeinfo i saved the first three attributes by the following code
datarow.["EmpID"] = EmpID.text;
but on GenID it gives problem bcoz i want to relate the Gender attribute to the GenID Attribute in the EmployeeInfo table and must be saved in the sql data table
SAS
|
|
|
|
|
Make the combo boxe's Display Member property to Gender and Value Member property to GenID. when assigning the values to employeeinfo use like this
datarow.["EmpID"] = EmpID.text;
.
.
.
datarow.["GenID"] = comboBox.SelectedValue;
Regards
|
|
|
|
|
Hi All,
After constructing a string from a byte[], is it possible to call a static method (I'm pretty sure ther is no memeber method) such as IsPrintable( <string> )? I would expect we would pass in a certainy or threshold value. Or is this one of those 'roll your own' implementations?
Jeff
|
|
|
|
|
Hi!
Of course it is possible to call a static method, but since System.String doesn't offer a static method doing what you want, you'll have to "roll your own".
I guess you could use static methods of System.Char for this (e.g. Char.IsControl() ).
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
hi
I will open the word file with C#2005 but print content file with c#2005
please help meeeeeeeeeee
tanks a lot
|
|
|
|
|
Cannot really be done without the help of the Office Interop Library.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi
I will open the word file with C#2005 but print content file with c#2005
please help meeeeeeeeeee
tanks a lot
|
|
|
|
|
|
hi there,
i insert binding navigator and bind it to combobox items like this
BindingSource bindingSource = new BindingSource();
bindingSource.DataSource = combobox.Items;
bindingNavigator1.BindingSource = bindingSource;
and its working but it have a problem that when i select any item in combobox then its position dont increase.
to do that i tried to just assign the "selectedindex + 1" of combobox to its position textbox's text in SelectedIndexChanged event
and its shows correct position but its not actual, that mean it just showing, not working
for example
i have 3 items in combobox, and i select 3rd item then it will show position is 3 but the last and next buttons still enabled and first and previous still disabled.
any idea to solve it?
thanks
Becoming Programmer...
|
|
|
|
|
Have you tried the Refresh method?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
yeah, but it didnt work
Becoming Programmer...
|
|
|
|
|