|
Why not do a SELECT with an ORDER BY? That puts the items in numerical order and then it is a matter of counting each one.
This signature left intentionally blank
|
|
|
|
|
Do you mean in the DataSet? Even if I get them ordered, I don't see how can I work with them. Can you please explain a bit more?
Regards,
Diego F.
|
|
|
|
|
The ADO.NET DataSet is a memory-resident representation of data that provides a consistent relational programming model regardless of the source of the data it contains. A DataSet represents a complete set of data including the tables that contain, order, and constrain the data, as well as the relationships between the tables. So if your first load of the dataset is all of the records ordered by the number.
Then you need to enumerate through the dataset counting the number of each type and that becomes another "table" which you add to the dataset which has the format number, count. Then you output the resulting union to the database.
This signature left intentionally blank
|
|
|
|
|
Hi all,
I would like my application to access the Visual Studio .Net Command Prompt so that i can run a command from my application.
I want my application to automatically register a dll by running the regasm command
>regasm Example.dll
What code would i use to do this ?
Thank you ...
|
|
|
|
|
Read on the System.Diagnostics.Process.Start(...) method.
|
|
|
|
|
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "regasm.exe"
p.StartInfo.Arguments = "example.dll"
p.Start();
Something like that should work, or come close.
Custom Software, Custom Solutions. Yye Software.
http://www.yyesoftware.com
|
|
|
|
|
hi,
I want to show the All Databases Names in the specific SQL Server using combo box.
How do I do that one ...
if anyone know about that,please help me.
|
|
|
|
|
|
Connect to the master database and perform the query
SELECT name from sysdatabases This will give you a list of all the databases on the server.
[EDIT]
I should have read more clearly - you just wanted the database names. Ignore the remainder of this post if all you want is the database names. If you want the table names as well then read on....
[/EDIT]
Then, loop around each of the databases performing the following query
SELECT user_name(uid) AS username, sysobjects.name AS tablename
FROM sysobjects
WHERE xtype='U' OR xtype='S'
xtype='U' is for User tables
xtype='S' is for System tables
From all of this you can get a list of all the tables in all the databases on your server.
Remember, user_name could be important as it is possible to have two tables in one database with exactly the same name, but with different user names. You would use the fully qualified table name to access it. e.g.
theServer.theUser.theTable
Does this help?
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
I think you will find the INFORMATION_SCHEMA views to be the most usefull. They are supposed to remain unchanged between versions.
SELECT *
FROM INFORMATION_SCHEMA.SCHEMATA
|
|
|
|
|
hi,
yes ,we can get databases Name from above query in local SQL server.But How do we collect databases Names in other SQL Servers...Suppose that another SQL Server is in my Network.I want to get databases Names from that...So How do I collect databases Names from Various SQL Servers in other machines.?
Thanks...
|
|
|
|
|
I guess I don't know what your asking because the only response I can give is:
Run the query on the other servers....
I sense that is not the answer you are looking for.
|
|
|
|
|
I have added 3 tab pages to a form. On each tab page the same user control has been added. On the control there is a left docked treeview and a right docked text boxes. I have added a splitter between these controls so that I'm able to change the size of the treeview. Once I change the size of the treeview in one tab the splitter should be located accordingly in the other tab pages as well so that I don't need to resize it. How can I achieve this?
samitha
|
|
|
|
|
Hi Smitha,
Problem lies in the layout of the userControl
In your case the constituent control s of the userControl should be put in the following sequence:
Step1.Put treeView control on the userControl , with Dock as Left
step2.Put splitter control, with Dock as Left
Step3.Put a panel on the userControl , with Dock as Fill
Step4.put all the textBoxes of the userControl in the above mentioned panel .
This should solve your problem.
Do revert back whether you could solve the problem or not?
(Note: Please delete all the constituent controls from your UserControl and start from Step1)
Regards,
Jay
|
|
|
|
|
Jay_sh_s wrote:
(Note: Please delete all the constituent controls from your UserControl and start from Step1)
That's not necessary and would be a waste of time, especially if lots of code was already written. You'd have to reset all the properties and hook the event handlers back up.
See my reply for how to fix this without removing all your controls and starting over with a fresh layout.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Dear Heath,
Thanks a lot for the added informations. Though I was knowing it roughly but had never tried. Now onwards, I will do exactly what you have suggested.
Regards,
Jay.
|
|
|
|
|
What Jay said is partly right, but don't delete all your controls! Whatever the designer does is also manually possible. Remember that most design-time serialization is your actual source code file.
You need to set the TabIndex of each control accordingly. So, the order that Jay was talking about is the order you should use for your TabIndex s for each Control .
Then, in Controls.AddRange (the method to add controls to a parent control that you'll see in your source code), add the controls in the reverse order you did above. Internally, AddRange iterates through the control array in reverse. You could also just use Controls.Add - in which case you add the controls in the TabStop order - but you could potentially break the designer (behavior varies; it really likes using AddRange ).
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Heath Wrote:-
You could also just use Controls.Add - in which case you add the controls in the TabStop order -
1.It should be TabIndex order...NOTTabStop order...am I right? seems to be typing mistake on your part.
2.I just tried it, actually it is adding in reverse order, not in the tabIndex order. like below:
this.treeView1.TabIndex = 0;
this.splitter1.TabIndex = 1;
this.panel1.TabIndex = 2;
this.Controls.Add(this.panel1);
this.Controls.Add(this.splitter1);
this.Controls.Add(this.treeView1);
Please clearify.
Regards,
Jay.
|
|
|
|
|
I said that if you use Controls.Add you must add the controls in the order of TabIndex . You only reverse the order when using Controls.AddRange . Please re-read my post for clarification.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Hello,
Can anybody explain me here how i can make periodically every five seconds screen shots on the Pocket Pc? - Means that automatically every five seconds should be made a screen shot of the display of the PocketPc and should be saved. Respectively is it possible that a screen shot of the display of the PocketPc is made when any event on the PocketPc occurs?
Thanks in Advance.
Regards.
Patrick
|
|
|
|
|
You do this the same way you would in Windows, with calls to GetWindowDC and BitBlt to copy the source bitmap to a compatible desination bitmap.
If you're doing this in .NET (you are in the C# forum after all), you have to P/Invoke these calls.
Read the article Capturing the Screen Image in C#[^] but keep in mind that not all managed and unmanaged APIs are available on the Windows CE platform (on which Pocket PC is built). More APIs are available in Windows CE .NET 4.x than in Windows CE 3.x and below, but both should have enough to get the job done (basic GDI APIs).
As for the timer, the System.Threading.Timer class is the only timer class supported by .NET CF. See the .NET Framework SDK documentation for more details, or write your own timer. It's fairly straight-forward to use and I have discussed it in regard to .NET CF before, so you can also click "Search comments" above this message board and search for that thread.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Keep in mind though that you don't have GB's of storage available. (unless you have a 2 GB CF card)
|
|
|
|
|
Thank you i developed a screen capturing class and it works.
regards
|
|
|
|
|
Probably is it possible to get noticed when a new window or a new tab pane on the PocketPc is opened? - this would be very good, because then i would make screen shots when a new window or tab pane is opened.
regards
pat
|
|
|
|
|
How can I send a fax using C#?
|
|
|
|