|
You can't use a double to show 18 digits: it only shows 15 significant digits (though it uses 17 internally).
If you want 18 digit precision, then you need to use an Int64 (or long ) value, which can hold up to 9,223,372,036,854,775,807 - 19 digits.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
A bit less than 17 even, approximately 15.9545897702 (it's probably a bad idea to measure it in decimal digits, 0.954etc of a digit is confusing).
|
|
|
|
|
Hi,
I have inherited what I would call a badly designed database using SQL Server. At the moment the application that uses the database has an Access 97 front-end and with XP now being end of life, I have been tasked with creating a new application to replace Access 97.
I am looking quite a bit into the project architecture to future proof the application and also for best practices. I have been reading into using a 3-tier architecture - DAL, BLL and UI.
I originally started looking into using EF but it doesn't seem overly compatible with my database as there are quite a few tables that don't have PK's and we already have a lot of stored procedures that will be used rather than directly to the table. I have currently decided that I will use ADO.Net but can't help but feel that is a bad decision.
I really have a couple of questions here -
1 - What project architecture do people generally use these days and what is best practice, can you provide me with some examples?
2 - If I continue down the ADO.Net route do I create different classes for the different Stored Procedures that are used?
3 - Am I making the right decision using ADO.Net?
Any help/advice/links are greatly appreciated.
|
|
|
|
|
EF also supports sprocs[^].
JammoD87 wrote: 1 - What project architecture do people generally use these days and what is
best practice, can you provide me with some examples? EF is the most mentioned out-of-the-box ORM's around here. LINQ is mainly something used on collections, and sometimes there's a mention of NHibernate. Most go for some custom implementation tough.
JammoD87 wrote: 2 - If I continue down the ADO.Net route do I create different classes for the
different Stored Procedures that are used? That's possible, if you'd want to.
JammoD87 wrote: 3 - Am I making the right decision using ADO.Net? Yes.
Well, EF makes a close second; I don't have hands-on experience with it, but heard good things about it. ADO has been there since .NET, and there's a lot of documentation on the subject. I'd say it is the path that has proven to work, with EF looking as a nice new alternative.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks for that, there's some helpful advice fhere!
|
|
|
|
|
If you are already using ADO.net I wouldn't suggest you to go with EF. If you wish to use EF you can use it You can even use your existing stored procedures if you want but may have to do some changes. The decision with EF or ADO.net depends on other factors also like
1) if you want better performance and working on huge data then go with ADO.net.
2) Whatever you are comfortable with. If you have a very good expertise in ADO.net then go with ADO.net or if you have very good expertise in EF then go with EF.
Instead of a 3-tier architecture I would suggest you to try GUI Architectural patterns either MVVM or MVC depending on the type of the application.
If you want to use 3 tier architecture then there may be more layers required to have separation of concerns e.g:- for cross cutting concerns etc.
|
|
|
|
|
Hello. I have this small application in which I am using some open source dlls. Whenever I build my project, git notifies that I have new files ("git status" command in Git Bash). Now I tried to ignore these *.exe, *.dll, *.pdb and *.xml files in .gitignore but in vain (I don't know where to put it...so I placed mutiple copies of it, in different locations).
How do use I git properly so that it recognize only the *.cs files and not all the EXEs and other stuff. Thanks for any pointer.
This world is going to explode due to international politics, SOON.
|
|
|
|
|
|
I have one Form with panel added to it. I have separate user control which display the rectangle.Now I have to add this user control to the form panel.I added it, but it not showing the rectangle.
|
|
|
|
|
This does not make any sense.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Your reply is perfect. Especially the joke about the 10 types of people.
|
|
|
|
|
How are you drawing the rectangle? Without seeing the code in the user control it's just about impossible to tell you anything useful.
|
|
|
|
|
This is either a Windows Forms or WPF issue.
Not really C#
Please use the correct forum.
A positive attitude may not solve every problem, but it will annoy enough people to be worth the effort.
|
|
|
|
|
To make sense of this, we need to know what you mean by "the rectangle:" is that created by your use of the Paint Event in the UserControl ? If you place the UserControl on a Form do you see the "rectangle:" have you ever observed the "rectangle" being drawn as you would like it drawn ?
«To kill an error's as good a service, sometimes better than, establishing new truth or fact.» Charles Darwin in "Prospero's Precepts"
|
|
|
|
|
Hi Team,
Anyone knows, how to edit Domain Default Policy using C# or power-shell?
I am looking for "Automatic Certificate Request" setting update.
-- Vikram
|
|
|
|
|
|
Hi
I have 3 labels in my aspx page named lbl1, lbl2, lbl3.
I want to loop them in my cs file like this:
for (int i = 1; i<3; i++)
{
lbl(i).Text = someFunction(i);
}
How can i do that?
|
|
|
|
|
I assume that you can do the same as you would in a Windows Form, and use foreach to loop through a set of control objects.
|
|
|
|
|
Label[] labels = form1.Controls.OfType<Label>().ToArray();
for(int i = 0; i < labels.Length; i++)
{
labels[i].Text = someFunction(i);
}
|
|
|
|
|
Thanks but now i get another error:
Error 25 'System.Web.UI.ControlCollection' does not contain a definition for 'o' and no extension method 'o' accepting a first argument of type 'System.Web.UI.ControlCollection' could be found (are you missing a using directive or an assembly reference?)
When I try do add a using it cannot be found...
(I am working on a web.net project not a console one)
What am I missing??
|
|
|
|
|
Thanks but now I get this error
Error 25 'System.Web.UI.ControlCollection' does not contain a definition for 'o' and no extension method 'o' accepting a first argument of type 'System.Web.UI.ControlCollection' could be found (are you missing a using directive or an assembly reference?)
When I tried to add the using it cannot be found
What am I missing here?
Thanks!
|
|
|
|
|
See attached image file: [IMG]http://imagizer.imageshack.com/img908/3636/urFBbz.jpg[/IMG]
assuming the data is loaded from SQL Server GridView includes 5 columns as shown above, cells Search of textbox where you find out quickly (due to its use on the image for illustration), in his cell this search textbox enter any value in the column that has (according to this column 5), the GridView grid lines present value of the lookup value, usually looking to have a value equal to 1 column with which to look, if you use fast search method does not need to specify one column before it, how to write this quickly find how to load into the GridView ?
|
|
|
|
|
1) No, I'm not going to random sites to look ate random images.
2) None of that makes any sense. It's probably a translation problem, but in English I can;t work out what you are trying to do, much less what help you need.
Remember that we can't see your screen, access your HDD, or read your mind. So try to give us information - perhaps an example - which means we can work out what the problem is.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
This is not really a C# issue.
It could be Windows Forms, Silverlight/WPF, or ASP.
Please use the correct forum.
A positive attitude may not solve every problem, but it will annoy enough people to be worth the effort.
|
|
|
|
|
Hi Guys,
I'm running Visual Studio 2008. I have a simple project that displays data in a DataGridView that is linked to Dataset, BindingSource and TableAdapter.
My data is in SQL Server and in a single table.
My program so far reads the data in no problem but I'm stuck saving my changes back to the database.
I can see I need to create an update query. I found the properties of the TableAdapter named "UpdateCommand" When I run Query Builder it creates a query like this.
UPDATE ExecuteItem
SET iOrderBy =, sDescription =, bContinueOnFailure =, dLastRunTime =, bLastRunStatus =, sSQLCode =, bActive =
Obviously it is missing a name between the equals and the comma.
What is the syntax for specifying the names of my fields in the dataset?
Can someone point me to an example of how this query should look for a simple single table update?
Thanks
David
|
|
|
|