|
I was wondering if there is a way to merge tables together in a dataset.
I can pull a "Select * FROM Table A" and fill the DataSet then do it for Table B as well in no time flat. But I don't know how to merge them into one table
But if I do a "Select a.Name, a.ID, b.ID, b.Number FROM a.Table AND b.Table B WHERE a.ID=b.ID" and fill a single table in my dataSet, but it takes so much longer because I am doing this over a connection.
Or am I missing the boat and something other than a DataSet is the way to go?
Thanks!
RABB17
|
|
|
|
|
You can do selects and joins on DataSets, but it's more complicated and annoying than doing it on the database.
I don't understand why a simple inner join takes noticably longer than a flat query. It certainly has nothing to do with your connection to the database. More likely, you've got a poorly-optimized database. Your previous question was about MySQL, so I'll assume that's what you're using. MySQL should be able to do a 1-column inner join on a million rows with a proper index in less time than a table scan (which is what you'd get if you did select name, id) from each table. I don't respect MySQL very much, but it's a hell of a lot more competent than to whimper on a 1-column inner join.
What's your DB look like?
|
|
|
|
|
The dataset is capable of joining tables, but the database is generally better at it.
If you join the tables in the query it should take about the same time to fetch as fetching the tables separately, unless one of the tables are much larger than the other so that joining the tables creates a result with mostly duplicates from the smaller table.
---
b { font-weight: normal; }
|
|
|
|
|
I have multiple tables that I'm pullng into a DataSet.
My first method was to run a query and merge the data I need into one table using the MySQL command.
But here's my problem. I have a shared field x_ID where in one Table A it is null and in Table B it is the primary.
For example:
I have
Table A
Customer_Purchase $5, $4, $3
Customer_ID 1, 2, null
Table B
Customer_ID 1, 2, 3, etc
Customer_Name ...
My return for Who purchased what would only have 2 rows and I'd rather have all three, even though one would have no name in it.
Thanks!
RABB17
|
|
|
|
|
1. You're posting on the wrong board. This is a SQL question.
2. What's your SQL query?
3. Tell us a little more about your table structure.
Otherwise:
If Customer_ID in Table A is a foreign key, you shouldn't allow nulls. If you have to, and you want three rows back, do an outer join. You still won't get a Customer_Name for the null/$3 record because there's no null key in Table B, which was probably enforced because Customer_ID is probably a primary key.
If you post your SQL query, I can probably help you more specifically.
|
|
|
|
|
Dear gurus,
my app has a rich user-interface which I have to test extensively by mouse-clicking on all the menus, buttons,.....
My idea now is to create a small tool which sends all this clicks,... automatically to my application for testing the user-interface.
Does anyone have an idea how this can be accomplished?
Or are there any other ideas.
Kind regards
|
|
|
|
|
Use the System.Windows.Forms.Cursor class, this has a property Position, you can use this to move the cursor.
Regarding actually pushing the mouse button I'm not sure if you can do this without having to resort to calling the Windows API, from what I remember the mouse events are quite easy to send using the appropriate API.
This[^] article may be useful to you.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
This doesn't seem like the best way to accomplish this task. There are many, many applications out there that can be used to script mouse moves and clicks. You'll save yourself a lot of time and trouble if you use one of those.
|
|
|
|
|
While implementing an automated GUI test tool may be an interesting and fun challenge, you may be better off purchasing au automated test tool. There are quite a few on the market, and you should be able to get one for as little as $500. In the long run, it would be cheaper to purchase the tool than to invest your time into developing your own. Just my two cents...
Jim Conigliaro
jconigliaro@ieee.org
|
|
|
|
|
You can get one for significantly less than $500: free. There are shareware and freeware click generators out there that work much better than anything anyone on this board can write in a couple day's time (no offense to anyone intended).
|
|
|
|
|
Hallo !
Thanks for your answer.
Can you give me any hint which tools are free-/shareware?
With kind regard
|
|
|
|
|
Hi,
I have a VB application using a .Net(C#) dll.I made the application wait for particular time from the .net dll and during the wait if i move between other open windows,the VB application gets hanged or becomes blank screened.
I tried using System.Windows.Forms.Application.DoEvents() to repaint the Vb application but it is not that effective.
I am totally clueless
Do not wait to strike till the iron is hot; but make it hot by striking.
-- modified at 6:27 Friday 2nd June, 2006
|
|
|
|
|
What exactly are you trying to do? Are you trying to modify the VB application? If so, you may get better results in the VB group. Likewise, if you're trying to modify the C# DLL, you may get better results in the C# group.
When you say that you "made the application wait for a particular time," how did you do this? Chances are, you did this incorrectly, and this is causing your blank screen. If you block the UI thread while you're waiting, the screen won't paint.
|
|
|
|
|
Why do you ask the same question again? Keep it in one thread.
---
b { font-weight: normal; }
|
|
|
|
|
I thought i could get any solution from .net side...
I m totally stuck up with this problem...
Do not wait to strike till the iron is hot; but make it hot by striking.
|
|
|
|
|
Actually i am devloping one windows application. it is on my network drive. its running on my PC. but when i try to run my exe from different machine from the same folder , it gives me error security exception. i try to open my project on othe pc, it gives me error that project location is not fully trusted.
and when i am giving trust to my application exe from .net framework configuration tool it gives me error that hash for this assembly can not be generated.
pls. reply as soon as possible..
i am just stuck
Hemaxi
|
|
|
|
|
The runtime doesn't trust the location you're running it from, because your developing it on your machine VS has probably set all the required permissions. To run it from another PC you need to goto: Control Panel -> Administrative Tools -> Microsoft .NET [version (e.g. 2.0)] Configuration. Inside the configuration pane select "Runtime Security Policy" -> Increase Assembly Trust, a wizard will popup and guide you through the steps required to allow that program to run from the network (note this can be configured on an app by app basis or for the entire machine).
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
If i use unmanaged code in my application then how does runtime comes to know that this particular piece of code is unmanaged code.
praveen
-- modified at 9:24 Thursday 1st June, 2006
|
|
|
|
|
If you're using unmanaged (unsafe) code directly in your application, you need to mark it unsafe or it won't compile. The runtime will know because you marked it. Google "unsafe code tutorial" for more help.
If you're using an unmanaged assembly (e.g. -- COM), the wrapper will deal with the unmanaged code, but you need to make sure you clean up any resources in your disposal method. Any proper tutorial on how to correctly implement the Dispose method in your classes should tell you where to put the code for disposing of unmanaged resources.
Stephan
|
|
|
|
|
I m working on Custom Controls in windows . But i m facing one problem. Let i have made one custom control and added this one to one form in a project(Let it me Kapil1). Now i have made some changes in custom control.
Now in project Kapil1 i replace the old dll of custom controls with new one. But controls which i have placed earlier r not changed. They r working according to old dll.
Can u pls tell me how can i get my old controls working according to new dll.
Kapil
|
|
|
|
|
Firstly, posting in intelligible English may help us understand what your problem is.
Secondly this problem is well known and Google should have returned something useful to you.
Thirdly, try deleting the old dll in the bin and obj directories of the project you are using the control in.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
In the VB6, we could using SaveSetting/GetSetting to store the information and get them for personalization of windows applications. But all these need the programmer to write code to save & get & set the windows layout (such as the width/height of one control of form).
Is there any application block support personalization for .net 1.1 ?
I think the dynamic property could help but I found that not all properties are supported by vs.net 2003 IDE (I haven't tried vs.net 2005), so if I wish to make the property not support by vs.net 2003 IDE, I need to write code to store the setting (maybe the runtime width changed user before the winform closed), and restore the setting saved the next time UI shown again.
If I am doing such myself, then it should be something could be an application block, but is there existing application block for personalization for winforms in .net framework 1.1 ?
--
Do or do not, there is no try.
Do or do not, there is no try.
|
|
|
|
|
Kent Liu wrote: But all these need the programmer to write code to save & get & set the windows layout (such as the width/height of one control of form).
This seems to imply that you want all settings to be saved automatically, is that what you are looking for?
Note that all settings that require saving / loading will require coding, it just depends who does it, it could be the designer (as in VS .NET one), it could be you or it could be someone else who has hidden the code behind a nice GUI.
To be honest unless you have thousands of settings it'd be easier to save them yourself. Perhaps the easiest would be to use an ArrayList to store the settings while the form is running, when the form closes this can be serialized to a file (or even :shudder: the registry if you require), and then when it runs again, deserialize it back and reload the settings from it.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Hi,
Is it possible to know the architecture/design of the component 'System.Web.Mail' present in .NET framework?
Ashu
|
|
|
|
|
Best starting point it'd suggest is Reflector[^] which will allow you to "see" the source code behind the class itself. I don't know of any documentation which provides a diagram of the component but it shouldn't be too difficult to use reflector.
On second thoughts I seem to remember an add-in for Reflector that would produce a relationship diagram between the classes used by the class under the cursor (in this case the Mail class), but I'm darned if I can remember exactly what it did and what it was called. Sorry
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|