|
Might you not use some sort of database at the back end instead of Excel?
Regards,
Rob Philpott.
|
|
|
|
|
Hi Rob,
I thought of just using a SQL server at first, but one of my objectives is to give the users the ability to export everything to an excel document. That's why I figured It would make the most sense to just read and write straight to the xls file rather than first importing everything into SQL to then turn around, read it all back out and then write it to the xls.
I think what I will eventually do is just use System.Diagnostic.Process to start up excel opening the file after I've done what I need to do with it.
"You're damned if you do, and you're damned if you dont" - Bart Simpson
|
|
|
|
|
Excel makes for a lousy database. There's a limited number of rows you can put into an Excel sheet, and there is also the constraint of memory. You may eventually find out you made a mistake by going with Excel.
|
|
|
|
|
Hi Dave,
Ah, I was unaware of the row limitations. Thanks for the warning. To make sure I don't cramp my programs room for growth I've decided to go with a SQL database and just add a button to allow the users to export the gridview to excel.
"You're damned if you do, and you're damned if you dont" - Bart Simpson
|
|
|
|
|
Most of the times, "Export to Excel" as a requirement is made by persons who have no understanding of technical issues. Which is a bonus for programmers in this case, it is trivial to export to CSV and 99.99% of end-users don't know the difference and those that do don't care. With that issue out of the way embed into SQL Express, it will make your life easier.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.
|
|
|
|
|
Greetings all,
I was curious if anyone knew how one would go about graphing data recieved from a serial port via rs232 in real time. I would just like to have a 2d line graph that would update upon every byte recieved from the serial port. The graph can have a static range as well, say from 0-255.
Any help would greatly be appreciated.
|
|
|
|
|
|
I should have said this in the first post, but I already have established a working com connection. I can send/recieve data through the port. What I really need help with is graphing the data.
With the custom control overriding, how exactly does that work? WOuld you be able to provide me with a sample code?
|
|
|
|
|
There are numerous articles on Code Project dealing with custom drawing in OnPaint for controls. The event argument contains a Graphics object which is very easy to use just by looking at the method signatures.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.
|
|
|
|
|
I will do some more research. thank you for the advice on the custom drawing controls.
|
|
|
|
|
|
Thanks for the link. Have you used ZedGraph before?
|
|
|
|
|
Yes I am using it now for some data graphing.
It is Open Source and it has lots of potential. Another possible solution might be .. MS released a chart control a month or 2 ago. I've tried it but for what I'm doing there was just to much overhead but it might be worth giving it a shot.
Hope This Helps
Rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
|
The following snippet is intended to read the current maximum value and increment it by 1 so that it uses it to store in the database.
I need to convert the result of rawValue to an integer, increment it by 1, an, include it as a parameter.
any ideas?
object rawValue = getTaskRefSQL.ExecuteScalar();
if (rawValue != DBNull.Value)
{
myValue = (System.Data.Sqltypes.SqlInt64) rawValue;
myValue++;
}
cmdCreateNewTaskQuery.Parameters.AddWithValue("@taskID_PK", myValue);
Jon
|
|
|
|
|
myValue = (long) rawValue;
Using this method to create your primary key isprone to errors, use an auto-incrememnting identity field where possible.
|
|
|
|
|
this works good for me...int.Tryparse will try and convert to an integer, returning true if it succeeds and false otherwise, you can probably do long etc too
here i feed in a string, and try to convert to an int...
booResult = (int.TryParse(strSpO2, out intSpO2));//feed in string, and request an int out
if (booResult == true)//then it is numeric
|
|
|
|
|
Is there a way to change the horizontal arrow symbol position in a sortable ListView column header? I want the arrow to be closer to the header text.
|
|
|
|
|
Good Morning/Afternoon/Evening,
I'm trying to copy the contents of an unbound DataGridView of one form into an unbound DataGridView on it's child form. I've been looking all over for a solution, but I can't figure the darn thing out. It should be a simple task, should it not?
Please help!
|
|
|
|
|
Lodeclaw wrote: It should be a simple task, should it not?
What should be simple? Copying the data probably is simple. Finding an example of it, probably not so simple since best practice would be to use an MVC design.
|
|
|
|
|
I don't know if it's simple or not, which is why I asked. I'm hoping someone can point me in the right direction so I can figure it out. All I want is an exact copy of a datagridview in one form to appear on another form.
|
|
|
|
|
Lodeclaw wrote: I'm hoping someone can point me in the right direction
Well if I were planning on copying a DataGridView, I wouldn't do that but if say for some hypothetical insane reason I was planning on it, I would start at the documentation for the DataGridView class.
|
|
|
|
|
I've looked through the documentation already. Since there's no help to be had here, I'll try a different route. Thanks anyway, Mike.
|
|
|
|
|
Lodeclaw wrote: I've looked through the documentation already
Did you find this?[^]
I'm not saying that's a good way to go about this, however it does seem to have some possibilities doesn't it?
|
|
|
|
|
I don't seen anything there that will help me in the copying process of an entire datagridview. I am filling my initial dgv in that manner.
In any case, I was hoping to find an easy way to transfer the data for easy viewing on an invoice form, but since as you said there are no examples of code... I'm now using a for loop to collect the data from my rows and populate the child form's dgv. It's probably better this way in the long run.
Thanks for the help, Mike.
|
|
|
|