|
William, has anyone told you (due to your lame ass tone in one of your replies that I just read) that you're a complete ass? I would hope to never work with someone with such a cocky remark.
C# Software Developer
|
|
|
|
|
If your a 'developer' and you ask me a question like the one above I'd sack you on the spot.
/Twat/
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
HI,
In my report I have it divided by groups. I added a Recorod Number (Special Field) to Section 3 (Details).
For some reason I get a recored count for all recoreds. I would like it to reset back to Zero in every new group.
Any Idea?
tnx
|
|
|
|
|
use Runing Total! instead of Record Number!
In order to reset the number of records you need to add new Runing total.
Choose a field of which will be used to count. Select method to Count.
Evaluate : each record
Reset: Every Group and choose the group header to reset the count.
just add the New runing total field to the details section and you are done.
|
|
|
|
|
Running total only works if you want the total at the bottom of the group. Now try putting it in the Header!
Make a custom function and there is a method to sum based on group (IIRC)
Need custom software developed? I do C# development and consulting all over the United States.
If you don't ask questions the answers won't stand in your way.
Doing a job is like selecting a mule, you can't choose just the front half xor the back half so when you ask me to do a job don't expect me to do it half-assed.
|
|
|
|
|
Hi!
I want to compare the contents of a compact database with a Sql Server Express database. I am guessing I have to do it with code since Express doesn't support replication (?). So I am thinking that I have to compare the Db's table by table. This is fine but my Db's are quite big with 162 tables. So I want to start by getting access to both the full Db's, meaning all tables like:
Database database = Server.Databases[DatabaseName] using Microsoft.SqlServer.Management.Smo
Can I do this with a compact database?
A reason for doing this is beside getting the ability to loop through the Db's instead of writing 162 "SELECT * FROM table"'s is that I want to use a progressBar easily (however a secondary issue). I was initially thinking of trying to fill adapters but I don't know if I can do this with SQL ("SELECT *" ).
Will be happy for any input, thanks.
|
|
|
|
|
Jacob Flarup wrote: I am guessing I have to do it with code since Express doesn't support replication
Express supports replication but not in this scenario. Express can be a subscriber if you have a Standard edition which acts as a publisher.
To the main question: I'm not sure that I would use SMO. Instead I think I would use SqlBulkCopy[^] against the Express database and use data reader against the CE database. This way I could load all the data from the CE database to the Express database (of course to different tables or even different database).
After loading the data you could use SQL (and procedures etc) to compare the contents. Of course this could be done using datasets in C# but if you have lots of data, I think the comparison will be more efficient in the database. If you have only small amounts of data you could fill one dataset from CE and another dataset from Express and compare the contents of the datatables in the datasets. SELECT * should fill a datatable nicely.
Hope this helps,
Mika
|
|
|
|
|
hi evryone
how i can show any massage before the main form is load ?
(i work in WinCE)
thank's for any help
|
|
|
|
|
E_Gold wrote: (i work in WinCE)
Good thing you asking in the mobile[^] forums..
wait a tick...
|
|
|
|
|
E_Gold wrote: how i can show any massage before the main form is load ?
Why only show the massage? Why not give it? It would be an awesome technology - Being massaged while waiting for an application to load.
Kristian Sixhoej
"You can always become better." - Tiger Woods
|
|
|
|
|
I always wonder, when cp will include a spell check. for people like me, who are not good at english. but in this case even spell check cant help you.
|
|
|
|
|
English is not my lenguage, sorry
|
|
|
|
|
neither mine. if you read my post again, i have included myself also. I just found that post funny. thats it, dont take offence man.
|
|
|
|
|
Look in program.cs, I think you'll be able to figure out how to do this.
|
|
|
|
|
thank's for the help, i have the Main form that load database and fill comboBox whit database. it take for 10-15 second. i need that in this time will be any message. how can i do it ? (i dont want MessageBox)
|
|
|
|
|
What you describe is named a "splash screen". There are lot of examples on this site describing how to do this.
|
|
|
|
|
Form1_Load(object sender, EventArgs e)
{
MessageBox.Show("My Message");
}
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
so you want to show a Splash screen.
create a form with message / image on it. now put a Timer and set the interval to 10000-15000, and on a Tick() Event just do this.hide(); and on the Load() of that form call (create instance and .Show() method) your Main Form.
and dont forgot to set that spalsh form to startup form instead of main form.
Done. so your splash form will be displayed while your main form is loading in background.
|
|
|
|
|
I have seen in many cases developers are creating property like this.
private int _UserID
public int UserID
{
get { return _UserID; }
set { _UserID = value; }
}
where no calculation or processing occurs at all in any way.
It is a better way?
In this case, we can simply use a public variable.
Which is better. Please comment.
Thanks.
|
|
|
|
|
There is no "better".
You'll get diff'rent answers depending on personal preference. One can argue that properties can be accessed through reflection, whereas a public variable can't. Some argue that it brings overhead in extra CPU-cycles, whilst this is hardly noticeble, especially in VB.NET applications that are doing heavy COM-interop
I are troll
|
|
|
|
|
Eddy Vluggen wrote: a public variable can't
Ummm... what?
|
|
|
|
|
..be accessed through reflection?
Or should that be "I don't know how to access a public variable"?
I are troll
|
|
|
|
|
Eddy Vluggen wrote: Or should that be "I don't know how to access a public variable"?
Yeah, maybe.
|
|
|
|
|
It's just a matter of what book you read / what your teacher instructed you. All academic's I've learned under always preached interface and design patterns before they showed you any code, so I for one always use Properties. Yes, like the other replier said, CPU cycles, but with today's hardware, what's a few cycles? I can't imagine using public variables anymore, whenever I do I hear my first Java 1 teachers' voice behind me saying 'getters and setters, getters and setters...'
|
|
|
|
|
This can quickly become an emotive issue, with developers having strong opinions on both sides. My considered opinion - if your property only serves to set a private field there's no reason to have it - some developers will shout that this breaks encapsulation, but get them to try and quantify why and they'll not be able to give you a satisfactory answer.
Saying that, I use properties almost all the time - the reason being that I generally have my properties do more than just set a field. In a lot of cases, my classes implement INotifyPropertyChanged, which you can use to raise an event when the property itself changes, so you can see changes reflected when using two-way binding. This means that my properties tend to look like this:
public class MyClass : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnChange(string propertyName)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName);
}
}
private string _name;
public string Name
{
get
{
return _name;
}
set
{
if (_name != value)
{
_name = value;
Changed("Name");
}
}
}
} Then, when somebody changes the value of Name in this class, the property changed notification is raised.
|
|
|
|