|
mfcuser wrote: question I have is naming the fields of the database. For instance, which one is better or preferable? [Last Name] or [LastName], [Employee Number] or [EmployeeNumber], [Total Cost] or [TotalCost]; I prefer the single name rather than using space.
I personally prefer no spaces, it saves me from headaches later on
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
Thank you I prefer that as well. About the wizard vs the script?
|
|
|
|
|
mfcuser wrote: About the wizard vs the script?
I rarely work with Access anymore. Wizard is fine, but if you want to port the tables to other databases, scripts are helpful. You'll just need to make any necessary minor modifications depending on what database you are migrating to
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
This is the way I look at it. Assume that I have an application and I created my table on access or sql. That means, my tables are access or sql. Now, assume some users want to use that application but with oracle or some other databases. I assume it would be better to use scripting.
Another way again, assume that I use access database, but some users want to use sql. So it will be changing some few lines of code to do that.
I also want to know if the wizard provides options for interchangeability. Basically, I want my application to have a wizard where user can choose the type of database to use for example, a user can choose access for local, sql for server or oracle for server etc. Assume that I use the wizard with access, will it be possible for me later to change that or have option to change it to sql, oracle etc.
|
|
|
|
|
mfcuser wrote: I also want to know if the wizard provides options for interchangeability. Basically, I want my application to have a wizard where user can choose the type of database to use
You want to read up on Data Abstraction Layers. The idea is that you have a variety of classes with the same interface, however, your application instantiates a specific class depending on the database to use. For the rest of the application all it sees is the interface, it doesn't care or need to know anything about the database. Only the DAL classes need to know about differnet databases.
|
|
|
|
|
mfcuser wrote: The problem I see with the wizard
...is that it is a wizard - Wizards are evil! Use them to see how the stuff works as a beginner, but don't rely on them.
mfcuser wrote: I also see more books and articles uses scripting instead of the wizard; maybe because the wizard is new.
No, it is because the wizard is evil!
mfcuser wrote: For instance, which one is better or preferable? [Last Name] or [LastName],
I prefer pascal cased names. That is a name where each word starts with a capital letter and there are no spaces. e.g. LastName, EmployeeNumber or TotalCost.
In a realworld situation it is up to the coding standards of the development team you are working in. Some prefer to prefix things (e.g. tblPerson, clmFirstName), others don't. Some prefer PascalCased others prefer camelCased (same as pascal, but with the first letter of the first word lowercased)
|
|
|
|
|
The way I look at it, for the fields I use pascal cases like [FirstName], [LastName] etc. About for the table name, is it good to use space for table name? Like for example, which one is better to name a table Customer Information or CustomerInformation?
|
|
|
|
|
mfcuser wrote: for the fields I use pascal cases like [FirstName], [LastName] etc. About for the table name, is it good to use space for table name? Like for example, which one is better to name a table Customer Information or CustomerInformation?
Keep a consistent set of rules and you'll do much better.
For example: PascalCase for all names in the database. Singular form of all nouns.
|
|
|
|
|
Colin Angus Mackay wrote:
Keep a consistent set of rules and you'll do much better.
Yep. But it is easier said than done, hence the need for reviews
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
Given that the wizard gives easy access to the fields via intellicense. If I use the wizard to I still need to use parametization for security reason?
|
|
|
|
|
|
mfcuser wrote: Given that the wizard gives easy access to the fields via intellicense. If I use the wizard to I still need to use parametization for security reason?
I've no idea what the wizard does. I used it once in 2001, saw what it did and thought Eugh!!! I'm not using that again!
|
|
|
|
|
Download this free e-book.
ASP.NET Database Programming Weekend Crash Course™ - introduces the reader to ASP.NET database programming in one weekend: 30 sessions of a half hour each, for 15 hours stretching from Friday afternoon to Sunday evening. At the end of each section of the book, you’ll get a chance to test your knowledge before continuing.
http://www.ebooknetworking.com/aspnet-database-programming-weekend-crash-course-p-28606.html[^]
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Hi, everybody!
I have inserted a dom node(representing an image) in a web page by c #, but how could I manage the click event of the node(i.e.the image)?
IHTMLDOMNode doesn't have th onClick event some ideas?
thank yuou all in advance.
|
|
|
|
|
Using typeconverter i am having a dropdown.i want to pass Displayvalue for a dropdown as string value and its id as int value.
E.g :- I have a dropdown called Fruit with 3 values(AAA,BBB,CCC).
if i select AAA i want to pass value 0,if BBB value 1 etc..
All values are retrieved from XML file.Also no hardcoding is allowed .
On propertyvalue changed event i get only display value (AAA,BBB,CCC) not id(0,1,2)...Tell me a solution to it.
|
|
|
|
|
On DataValueField property set values 0,1,2...
On DataTextField property set values AAA,BBB,CCC...
"My advice to you is to get married. If you find a good wife, you will be happy; if not, you will become a philosopher." Socrates
|
|
|
|
|
I’ve created a Spash-form that shows and hides while my main form initializes. When I closes the splash-form my main window is paced behind other applications in Windows.
How can I force my application form to be the “on top application”?
I’ve tried all these functions:
this.Activate();
this.Focus();
this.Show();
this.WindowState = FormWindowState.Maximized;
this.BringToFront();
this.UpdateZOrder();
_____________________________
...and justice for all
APe
|
|
|
|
|
Erhm, I think it would be neater if you open the main form imidiately and show the splash screen on top of that..
|
|
|
|
|
|
I’m automating MS Project and when I listen on an event from MS Project all works fine but when I’m trying to fill a TreeView I got the following exception:
Action being performed on this control is being called from the wrong thread. Marshal to the correct thread using Control.Invoke or Control.BeginInvoke to perform this action.
What have I missed?
I've earlier discused this topic in the COM-forum:
http://www.codeproject.com/script/comments/forums.asp?msg=1793890&forumid=1648#xx1793890xx[^]
_____________________________
...and justice for all
APe
|
|
|
|
|
Hi,
using Invoke as you wrote in the other forum is the correct way to handle this. How to avoid changing all your calls depends on your situation. If you receive an event from another thread and want to call multiple methods on the TreeView then just marhsal the complete handler to the correct thread. Here a sample with a simple EventHandler :
public void HandleEvent(object sender, EventArgs ea) {
if (myTreeView.InvokeRequired)
{
myTreeView.Invoke(new EventHandler(HandleEvent), sender, ea);
}
}
This method just calls itself within the correct thread if required.
If the code resides within the container control of the TreeView than you can also use base.InvokeRequired and base.Invoke .
Robert
|
|
|
|
|
Ok, now I've got a new problem.
How do I Invoke a property. I got the same exception when I try to use this property:
TreeNode.ImageIndex
_____________________________
...and justice for all
APe
|
|
|
|
|
Hi,
I am developing a set of custom controls for work with very, very specific purposes. All of these controls are inheriting from the control base class.
My question is : Is there an easy way to 'hide' all of the default properties and only expose the ones I need or do I really have to hide them one at a time?? This seems like such a silly question, I know, but I'm at a loss - most of these controls only really need the default size and backcolor properties but absolutely none of the others and hiding them one at a time from the designer and intellisense is making for some extreme code-bloat...
Any help would be much appreciated...
Cheers
Ian
|
|
|
|
|
Add a custom designer to the project and override the PostFilterProperties method. Example:
public class MyDesigner : ControlDesigner
{
protected override void PostFilterProperties(System.Collections.IDictionary props)
{
props.Remove("property name");
base.PostFilterProperties();
}
}
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Background of my Project....
My project is an asp.net web page that is to run on local machines processing local reports. As of yesterday my web page is using a report viewer to load rdl's not rdlc's. It can handle subreports, drillthroughs, export to csv, expression evaluation, parameter input on the webpage, validation of parameter inputs, etc
Code change that leads to this issue....
I was given the task to find "Special Keys" in expressions for parameter default values and dataset parameter values and replace them with other data. I thought this wouldn't be a big deal until I get this error. I really dont understand why it is getting thrown.
Below is an sample of my code and everything runs fast except when it gets to the highlighted code. When it gets there I do a quick watch on rv.LocalReport.GetParameters() and the Value says Function evaluation is timed out.
The error that is getting thrown is a LocalProcessingException with a message of Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. I think this is getting thrown because .Count on rv.LocalReport.GetParameters() is not able to be processed because of the function GetParameters() being timed out.
public RParameter[] GetRdlReport(ref ReportViewer rv)<BR>{<BR> // Always enable hyperlinks even if they do not exist.<BR> rv.LocalReport.EnableHyperlinks = true;<BR> rv.LocalReport.ReportPath = msReportFullName;<BR><BR> List<RParameter> rps = GetParameterAll();<BR> if (rv.LocalReport.GetParameters().Count > 0)<BR> {<BR> for (int i=0; i<rps.Count; i++)<BR> {<BR> RParameter rp = rps[ i ];<BR> foreach (ReportParameterInfo rpi in rv.LocalReport.GetParameters())<BR> {<BR> }<BR> }<BR> }<BR>}
Chris
|
|
|
|