|
At some point you are going to need to get some optimisation done at the database level, indexes need to be created. That is why there are reporting databases and data warehouses. There is only so much you can do with query design.
You might try and get them to allow you to use a schema then you could take snapshots of the data and manipulate it to get some performance.Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Sorry for th late reply. I received more documentation on the keys and indexes today. Here are the keys and indexes for the NINVREC table:
Table Indexes
Name Number of Fields
Key 1 2
Fields:
INV-MK-MODEL-NBR Ascending
INV-MK-SERIAL-NBR Ascending
Key 2 1
Fields:
INV-SERIAL-NBR-KEY Ascending
Key 3 1
Fields:
INV-PRIMARY-SERIAL-NBR Ascending
Key 4 1
Fields:
INV-DATE-SOLD Ascending
Key 5 1
Fields:
INV-LOCATION-REC-1 Ascending
Key 6 1
Fields:
INV-TICKET-NBR Ascending
Here are the keys and indexes for the MISCITEM table:
Table Indexes
Name Number of Fields
Key 1 6
Fields:
MISCITEM-DATE Ascending
MISCITEM-HOUR Ascending
MISCITEM-MINUTE Ascending
MISCITEM-SECOND Ascending
MISCITEM-DUPLICATE-TIME Ascending
MISCITEM-STORE-KEY Ascending
Key 2 1
Fields:
MISCITEM-SALE-DATE Ascending
Key 3 3
Fields:
MISCITEM-CUST-ACCT-NBR Ascending
MISCITEM-TICKET-NBR Ascending
MISCITEM-TICKET-SEQ-NBR Ascending
Key 4 2
Fields:
MISCITEM-MODEL-NBR Ascending
MISCITEM-SERIAL-NBR Ascending
Key 5 2
Fields:
MISCITEM-EXCHANGE-MODEL-NBR Ascending
MISCITEM-EXCHANGE-SERIAL-NBR Ascending
Key 6 1
Fields:
MISCITEM-PENDING-SALE-DATE Ascending
So if I do a join on the INV-MK-MODEL-NBR-INV-MK-SERIAL-NBR and MISCITEM-MODEL-NBR-MISCITEM-SERIAL-NBR that should speed it up, correct?Jude
|
|
|
|
|
Yowza! That too the 27 minute query to less than 4 seconds!
Thank you for all of your direction as I am not extremely fluent in SQL.Jude
|
|
|
|
|
How to get all folders , subfolders and forms of my project !
|
|
|
|
|
|
WHY ?
|
|
|
|
|
jojoba2010 wrote: WHY?
Your title means nothing and your question means little more. Try reading some books on C# and .NET, and doing some research, and then come back with a sensible question that refers to something you have actually done for yourself. If you are using these questions to learn how to write a program you are wasting everyone's time, including your own.MVP 2010 - are they mad?
|
|
|
|
|
If you think something like this ,I am sorry for you ?
My Question :
I wanna this(all subfolders and forms) and fill in treeview and then when i click on any form in subfolder or anywhere it returns all controls in that form !
So who can i do that !?
|
|
|
|
|
jojoba2010 wrote: If you think something like this ,I am sorry for you ?
Why be sorry for me, I have no problem? I was merely pointing out that the subject "C#" in your question tells us nothing. Try something like "Help with TreeView" as a more descriptive type.
Also your question suggests that you need to study .NET and C# in more depth as your request is for a full function TreeView implementation which populates from a directory structure. This in itself is not that difficult if you try studying the control itself, or do a Google search, or take a look at the articles here on CodeProject.MVP 2010 - are they mad?
|
|
|
|
|
If you read the link provided, you would notice that,
1) your topic is less than clear
2) you're asking "how do I do this" without any comments on what you have tried so far etc.
The forums are for assistance with what you're working on, not for people to give you the work.
you should post,
Topic: Subfolders and Files
Content:
I am working on a project to <insert reason="" here=""> and I'm trying to figure out how to <>. I've tried x, y and z, but I've not had much luck. Can anybody see what I'm doing wrong, or point me in the right direction please?
|
|
|
|
|
Thanks dear !
SORry?!
So whats you idea !?
I have tried :
public void PopulateTree(string dir, TreeNode node)
{
DirectoryInfo directory = new DirectoryInfo(dir);
foreach (DirectoryInfo d in directory.GetDirectories())
{
if (d.Name != "bin" && d.Name != "obj" && d.Name != "Properties")
{
TreeNode t = new TreeNode(d.Name);
PopulateTree(d.FullName, t);
node.Nodes.Add(t);
}
}
foreach (FileInfo f in directory.GetFiles())
{
string[] Count = f.Name.Split('.');
if (Count.Length == 2 && f.Extension == ".cs" && f.Name != "Program.cs")
{
TreeNode t = new TreeNode(f.Name);
node.Nodes.Add(t);
}
}
}
private void btnGenerate_Click(object sender, EventArgs e)
{
treeView1.Nodes.Add("Resource Generator");
PopulateTree(@"F:\AliWinTAP\WinTAP", treeView1.Nodes[0]);
}
|
|
|
|
|
Because...[^].45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
If you feel the need to do something like this, you have a serious, serious design flaw in your application.
|
|
|
|
|
I wanna this(all subfolders and forms) and fill in treeview and then when i click on any form in subfolder or anywhere it returns all controls in that form !
So who can i do that !?
|
|
|
|
|
Are you writing an AddIn for Visual Studio? Or are you trying to get all the form Name properties or your own application at runtime?
|
|
|
|
|
My own Application Only !?
|
|
|
|
|
Since your project doesn't exist at runtime, there's no subfolders or form files or anything else.
You'll have to use Reflection to find all of the classes that decend from the Form class.
But, you have another problem. At runtime, the controls on a form do not exist until you create an instance of the form. ONLY then will they show up.
|
|
|
|
|
use System.IO namespace
DirectoryInfo,FileInfo and DriveInfo are the classes which can help "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Good people,
I have designed an application that uses WPF and targets the .NET 3.5 library. Can I assume that, if the person downloads .NET 3.5 (full or client profile), my application can run on Windows XP, Vista and Windows 7?
Also, sometimes during startup, while my application is showing the splash screen, if the user clicks around or attempts to do something else - like return to another application while mine is loading, my application will fail to load and throw an error of some sort. Any ideas on what's happening or what I should do?
Thanks in advance for any insight or information you can provide.
|
|
|
|
|
BlitzPackage wrote: Can I assume that, if the person downloads .NET 3.5 (full or client profile), my application can run on Windows XP, Vista and Windows 7?
Is it likely? Yes, assuming you haven't used any OS version specific functions, P/Invokes, etc. Though check up on the client profile/full version of the framework thing.
Is it certain? No. Test, test, and test again on all three, and still be prepared for the odd one that doesn't work.
BlitzPackage wrote: Also, sometimes during startup, while my application is showing the splash screen, if the user clicks around or attempts to do something else - like return to another application while mine is loading, my application will fail to load and throw an error of some sort. Any ideas on what's happening or what I should do?
Use the debugger. The name of the exception thrown may help. If you this doesn't help, post the exception details here, and a small, relevent amount of code from that location in your project, and we can all take a look.
|
|
|
|
|
I am developing a device that uses FTDI USB driver. The FTDI USB chip creates a virtual COM port every time a new device is plugged in to the computer. e.g. COM16. Even when the device is removed, this port COM16 is still marked "In Use" in Windows Device Manager.
When my device is in production, certain computer may connects to 100s of them. I don't want to see COM200(in use). That will be a big problem for the application.
So how can I programmably (C#) make a virtual COM Port available to my device? e.g. COM10 (in use), release this COM10, so my next device can use it. I know how to force Windows Device Manager to release it manually, but I need to do this programmably by my application in C#.
Any advice will be appreciated!
|
|
|
|
|
not exactly what you asked, but maybe a workaround:
on the manufacturer's websit www.ftdichip.com you will find the menu Documents/Application Notes, an on that page the "Advanced Driver Options"
AN_107
Chapter 7 describes the posibility to set registry entries to ingnore the hardware serial number. So you will get only one device installed, even if you frequently plug others of the same VID (Vendor ID) and PID (Product ID)
|
|
|
|
|
Consider a WIFI network and we are given a random local ip eg 172.20.0.228 and i want to find out WIFI access point through which this user is connected without using anything on user side , (using a C# program).
I think two possible solutions can be -
1) Trace a path to given ip 172.20.0.228 so that the node before the given ip in the will be access point.
2) Query all acess points and get a list of users connected to them. Then we can search any given ip (eg 172.20.0.228 in this case) in those lists.
My Problem is i dont know how to implement any of these two possible solutions in c# (Windows Application) prefrebly but if its not possible in C# post something in vc++ too.
I think 2nd solution of getting list of users will be more appropriate. So suggest me something to implement this thing in c#.
How can we get list of users from an access point ?
Thanks
|
|
|
|
|
Hi All
i have a class that inherits from the Label class.this class have to returns a DialogResult like a Button Control.but i can't create this property correctly.the following code is my class:
public class GA5_Button : System.Windows.Forms.Label
{
[Browsable(true),
DefaultValue(typeof(System.Windows.Forms.DialogResult))]
public DialogResult MyDialogResult
{
get;
set;
}
}
i want to click on this Control then set the Form.DialogResult on MyDialogResult value.how can i do this?sorry for bad english
Thanks in advance
modified on Tuesday, February 9, 2010 10:02 AM
|
|
|
|
|
What is the problem - it seems to work for me:
public partial class LabelClick : Label
{
public LabelClick()
{
InitializeComponent();
}
[Browsable(true),
DefaultValue(typeof(System.Windows.Forms.DialogResult))]
public DialogResult DialogResult
{ get; set; }
private void LabelClick_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
}
}
And in the form:
private void labelClick1_Click(object sender, EventArgs e)
{
DialogResult = labelClick1.DialogResult;
}
Closes my form and returns DialogResult to Form.ShowDialog
What is it doing (or not doing) for you?If Barbie is so popular, why do you have to buy her friends?
Eagles may soar, but weasels don't get sucked into jet engines.
If at first you don't succeed, destroy all evidence that you tried.
|
|
|
|