|
Thanks Eddy,
That looks like what I need. I will take a look at it and see.
|
|
|
|
|
|
|
hi,
i'm using visual c# 2008 xpress, sql srver 2005 xpress
the dataset is ItemDataDS
that's what i do :
SA.ItemDataDSTableAdapters.tblItemDataTableAdapter taItemData;
ItemDataDS ds = new ItemDataDS();
DataTable dt = ds.Tables[tablename];
i create and populate an array of objects ao and do : dt.LoadDataRow(ao,true);
when i check ds (debug) i find the table and in the table i find the data
finally i do : taItemData.Update(ds);
this is done without and error but when i check the db-table no data was written
the TableAdapters insert-, update-, select- and delete-methods work as i added and updated one record with the dataset-designer.
the fill() method also works 'cause this record can be seen in the ds.
any suggestions what i'm doing wrong or what i can do analyze the problem ?
thanks in advance
|
|
|
|
|
Don't post the same thing in the forums and QA - it duplicates work and wastes time, which is rude.
Pick one, and stuck with it.
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
|
|
|
|
|
Hi,
You might need to set the insert, update and delete command for your dataadapter.
SqlCommandBuilder cmdbuilder;
cmdbuilder = new SqlCommandBuilder(dataAdapt);
dataAdapt.DeleteCommand = cmdbuilder.GetDeleteCommand(true);
dataAdapt.UpdateCommand = cmdbuilder.GetUpdateCommand(true);
dataAdapt.InsertCommand = cmdbuilder.GetInsertCommand(true);
Best Regards
Muthuraja
|
|
|
|
|
how to multiply combo box value with text box value in c# and also retrive in another text box that can be used for another addition of values
|
|
|
|
|
abhishek808000 wrote: combo box value Retrieve the value from the combo[^];
Double zeValueFromZeComboBox = Convert.ToDouble(comboBox1.SelectedValue);
Next, retrieve the value from the textbox;
Double zeValueFromZeTextBox = Convert.ToDouble(textBox1.Text);
Multiply and display result;
Double zeResult = zeValueFromZeComboBox * zeValueFromZeTextBox;
textBox2.Text = zeResult.ToString();
This is basic stuff, and you should be able to figure it out using the documentation. Are you doing a course on this stuff? Or learning it as a hobby?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Please use Parse or TryParse rather than Convert; think of the children.
|
|
|
|
|
it getting output is 0
my code is
Double a = Convert.ToDouble(cmbqua1.SelectedValue);
Double b = Convert.ToDouble(txtrt1.Text);
Double result1 = a * b;
txtpr1.Text = result1.ToString();
txtpr1.text shows 0 value
|
|
|
|
|
Use the ComboBox SelectedItem property instead of SelectedValue.
Double a = Convert.ToDouble(cmbqua1.SelectedItem);
Double b = Convert.ToDouble(txtrt1.Text);
Double result1 = a * b;
txtpr1.Text = result1.ToString();
Jibesh V P
|
|
|
|
|
thank you.. it works
|
|
|
|
|
Glad it works. but do try to spend some time debugging your application and do some google search... its always good to solve an issue by self and issues these are easy to be find by self.
Jibesh V P
|
|
|
|
|
Parse the Text values (they are strings in there, not actual numbers you can use) into an appropriate datatype, such as an Integer adn do your math with those values. See TryParseInt32.TryParse()[^] for more information and an example.
|
|
|
|
|
You will likely find that NumericUpDown s are more appropriate to the task.
|
|
|
|
|
Hi
I have 3 different projects (all in Windows Forms). I want to make a fourth form which will be the Menu form from which I can navigate to the other forms. I'm looking for a way to combine all these project to the fourth project so I'll be able to access the other forms from the Menu form. I tried the "add existing item" but the problem is that all the forms in all the projects are named Form1.cs and Form1.Designer.cs so it doesn't let me (although the forms have different names).
So how can I combine all these project? or how can I change the name of a cs file without doing any damage?
Thanks a lot.
|
|
|
|
|
You'll probably have to rename these files and change the class names to something more meaningful, then copy the files into the same project.
No, there is no easy and/or automated way to do this.
|
|
|
|
|
how to cache data with dictionary in C#?
|
|
|
|
|
You put the lime in the coconut and you drink it all up.
A better question may get a better answer. (Though I wouldn't put any money on it.)
modified 9-Feb-13 11:54am.
|
|
|
|
|
PIEBALDconsult wrote: You put the lime in the coconut and you drink it all up.
And now I feel better
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
You're question is about as broad as it could possibly get, so the answer is going tobe just as broad:
You save the data in the Dictionary with a Key value so you can look it up.
Without knowing more about what it is you're trying to cache, how much data is in each entry and how much data you want to cache overall and for how long, what kind of application you're talking about (WinForms, WPF, ASP.NET, ...) it's pretty much impossible to tell you anynthing useful.
Remember, the quality of the answer you get is directly dictated by the quality of the question you ask.
|
|
|
|
|
thankue for yoyr attention.
my applitaion is a web application and a i want to cache a main menue items .for that have a 30 items .
when user click on a main menue i want to load items from cash .
my menue is daynamic and user can have own menues items
|
|
|
|
|
Well, .NET 4 and above has caching supporting built in. This was taken from the old Caching Application Block in the Enterprise Library after version 5.0. You can read more about that here[^].
There's also ASP.NET's builtin support, here[^].
|
|
|
|
|
For basic caching, you can build your own simple mechanism.
For e.g. cache in a temporary table in the database.
For complex solutions, there are a number of third party tools available that support caching.
|
|
|
|
|
in my windows application
i have a Button=EditShapeFile
when am clicking editshapefile this will auto matically generate three columns in shape file.
How it is Possible Using C#
|
|
|
|