|
I suspect you are experiencing a fundamental misunderstanding about application development. Unless your 10 forms are all visible at once, you won't have 10 datasets in memory at all. Most likely, your app is pulling data from a SQL Server DB that other users are accessing ? In that case, it's always best to be working on up to date data. There should be a data layer that's used globally, but not an actual global dataset that contains data.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank you.
Probably all I need is a lot more reading on design patterns .
|
|
|
|
|
No, this has nothing to do with design patterns. I did mention some stuff to do with n-tiered development ( I'm giving you a term you can google here ), but the core thing is, members of your forms do not exist unless the form exists.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I think it's more along the line of "Think of the poor guy who inherit the system"
1. He may need to add fields etc later, and break 9 of the form, or spend more time not to break them.
2. In order to not break the other form, he may add another global dataset.
3. Then another guy who inherit it, see the 2 global dataset with similar data, he either has to make sure it doesn't break anything, or add something in the dataset, break something, and spend more time fixing the rest.
I have seen it in one of the application in my previous company, and I was unfortunately the Nth guy.
Keep the dataset to each form or business object, and keep the problems localized.
|
|
|
|
|
Hi Experts, I want to build free program that simply converts RTF fromt to HTML fomrat. Firstly, I want to have the following functionality like Bold, Italics, and underline. How do I do this startup. Is it better to concentrate on Regular expression or any windows call. Is there any other things i need to be carefull about.
Thanks in advance for ur input.
|
|
|
|
|
Regex does seem like an obvious way to parse your text. Another thought - I suspect Word does this for free, what's your application, can it require Word to be installed ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I don't want to rely on microsoft Word howerver, i want my solution to be independant.
|
|
|
|
|
yeah even i want to convert both english,chinese from rtf to html with bold,italics and underline formats...
kindly help me on this issue..
|
|
|
|
|
Hi netJP12L,
The RTF Converter[^] includes the conversion from RTF to HTML.
Cheers,
Jani
|
|
|
|
|
A bit of somewhat relevant info: I play Need for Speed Hot Pursuit 2 and I'm making an easy way to modify the car's data. I have a ComboBox on the form and when the form loads I want it to read the content of the game's "Cars" folder. So basically what I'm looking for is the C# equivalent of PHP's glob function to get a list of folders in the "Cars" folder.
|
|
|
|
|
That's what Directory.GetDirectories() is for.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Go away Murphy's Law! About a minute ago I figured out how to get sub_directories.
Thanks.
|
|
|
|
|
Hi All
Is declaring a Variable using static public int aVariable = 0; the same as using public static int aVariable = 0;
and if not why is this so.
Equally if they are are the same why the two formats.
Thanks
James
|
|
|
|
|
There's no difference. It's not really two formats. In the specification of the language, there are just no rules regarding the order that you can specify certain combinations of modifiers/accessors.
David Anton
http://www.tangiblesoftwaresolutions.com
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
C++ to C++/CLI Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: converts C# to C++/CLI and VB to C++/CLI
|
|
|
|
|
These are the same; both of these statements define the following portions of the field declaration:
[modifier ] [accessibility ] [data type ] [variable name ] and [initializer ]
The static keyword is the modifier, which identifies exactly one storage location.
The public keyword is the accessibility, which defines the external visibility of the field.
The int is the datatype.
The language specification doesn't require a specific order for the modifier and the accessability keywords, as long as they come before the datatype the compiler will understand what is meant.
This lack of order for these keywords is done mainly to leave the order up to individual preference. Some people prefer the accessibility to be stated first, while others prefer the modifier first.
|
|
|
|
|
I have an application in C# who is connected with access database.
I have table called tblStudent. My problem is:
Can I pick a value of combobox, and all data for that value
to get in CrystalReports...
Table tblStudent has a first field number called IDStudent
I mean when I select from combobox for exapmle
value 23(this is IDStudent number for 23-trd student), I want crystal reports to take all data
with value who I choosed from combobox.
If I choose from combobox value 15, the crystalReport to take
all data for student with IDStudent 15.
Is this possible? I try to resolve this, but I am beginner
so I need your help C# lovers.
Thank you veru much, and I apologize for
my bad english in some parts of the text.
Greetings
kpp
|
|
|
|
|
Hi,
I have some advanced knowledge of programming with C and C++.
While I like C for its simplicity and speed, it lacks some important functionality (like OO). I'm not very fond of C++, since it is quite clumsy. (But you know all that already)
Anyway, I was looking for a new programming language for little projects. I looked into the specs of the D language and became quite fond of it. Anyway, I hear a lot of good things about C# as well.
I am not experienced enough to compare the two simply on the basis of their specifications. I tried finding some comparison on the internet but failed to find anything more recent than from 2003.
I was wondering about the advantages of either and languages, and in which case one is more appropriate than the other and I hope you can help me out!
Many thanks in advance,
Mike
|
|
|
|
|
C++ is awesome, sorry to disagree.
The main advantage of C# is that more than 5 people have heard of it, there's tons of support and there's actual real world jobs using it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I was aware of this, but I was more interested in the technical side
|
|
|
|
|
At the end of the day, if you want performance, you want C++. However, realistically, the fact is that for most tasks, you won't notice the difference that C++ gives you. If you just want to program for fun, then the answer is, a forum dedicated to the D language is far more likely to contain people who have used C# than vice versa. Even then, I don't see it as likely that you'll have reasons to use D that are compelling enough to offset the lack of support.
If you have any intention of coding for a living, then you can't avoid the fact that C# is where the money is at ( unless there's a niche market for D that I'm not aware of ).
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I looked at D a few years back, and as far as I'm concerned it's C++ with added sugar (and garbage collection). Neither language fixes all the shortcomings of C.
On the other hand, when considering C# it's not so much a question of the language itself, because C# targets the .net framework which, for me, far outweighs any particular language features and really invalidates any comparison.
I use C# regardless of the size of the project, though I still use C a little bit as well.
|
|
|
|
|
Hello, I have a multiple textboxes in a form.
I read in values from a textbox, and depending on what is read in, values are sent to certain textboxes. However I am not able to do this dynamically.
---textfile---
ownerFields_text
--------------
private void writeToApp(string readIn)
{
TextBox txtBox = new TextBox();
txtBox.Name = readIn;
txtBox.Text = "Why wont this work"; //line doesnt work ownerFields_text.Text = "hello"; //line works
}
Although looking in the properties in the debug windows for txtBox,shows property name=ownerFields_text, but its just not printing "Why wont this work". I do not want or cant cycle through controls for the right one.
Thanks.
jimmy
|
|
|
|
|
j_sen wrote: TextBox txtBox = new TextBox();
txtBox.Name = readIn;
txtBox.Text = "Why wont this work";
So you create a new TextBox, give it a name and some text.
Fine.
This has nothing to do with other TextBoxes that may already exist.
It will not magically point to an existing TextBox with the selected name!
If you want to set the text of MyFirstTextBox, the one direct way to do this is
by MyFirstTextBox.Text="new text";
If you want to modify one of many existing Controls, you either need:
1. a lot of code (one piece for each Control), say a switch
2. or a Dictionary that maps names onto Controls
3. or Reflection
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Luc Pattyn wrote: If you want to modify one of many existing Controls, you either need:
1. a lot of code (one piece for each Control), say a switch
2. or a Dictionary that maps names onto Controls
3. or Reflection
4. or the Find method.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
right.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|