|
I'make asp project but my problems happens when over 20 users register in the same time , i found that only 3 users register in db however all 20 users received message that they made registration successfully.
|
|
|
|
|
do you use statics or some kind?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
|
is there a try catch around the sqlCommand and is the possible exception caught and stored somewhere? That might give a better indictation
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
i am interesting about your system,it's a useful one with large amount of people?
i think if members aren't concentrated at the same time ,you can delay some seconds to release the charge!
|
|
|
|
|
Hi,
I've a DB in MySql, with a field DATE where i store only dates. When i'm getting this field from DB and put it into DataGridView it adds also default time
for example, if i have 1.1.11 in DB, in DataGridView i see "1.1.11 12:00 AM"
how can i prevent the additional date from being added to the datagridview
the thing here is that the one who has implemented this part didn't define a columns in grid view, but just populated it with the DataTable, like this dataGridStatData.DataContext = table.DefaultView; therefore i cant just edit column style...
|
|
|
|
|
There is no such thing as a Date in .Net, only DateTime. So you will need to set a formatter on that column. You can do so by handling the DataBindingComplete event and looking up the column you want to show only dates (or, if all columns in this table which are DateTime should actually only show dates, by type).
|
|
|
|
|
how to get MAC address from Windows-mobile using C# code ?
thank in advance
|
|
|
|
|
|
|
Waaay too late to the party, my friend ...
1) Anything Linq related is going to be slower...
2) Linq2Sql is dead... I don't believe MSFT is developing it any further, they are focusing on Entity Framework.
Plenty of ORM frameworks to choose from. Linq2Sql is NOT a good pick. EF, nHibernate, etc. are better choices.
|
|
|
|
|
Linq2Sql is dead indeed, but it has been completed. Theres nothing to be done more. So I cannot consider this as a disadvantage.
EF is much more complex and difficult to use. It also has lots of bugs. Linq2Sql is a perfect choice for smaller applications. What about larger apps? EF is also quite slow. In some scenarios ADO.NET could just be better choice.
NHibernate? It almost doesnt have any sensible documentation, tutorials, showhows. It is the worst possible choice in my opinion.
|
|
|
|
|
It's all rubbish. Roll your own so you know what it's doing.
|
|
|
|
|
Haha. And all this time I was thinking it was the latest and greatest. Oh well, I will definitely look into alternatives, as mentioned. Thanks! :P
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
Although Entity Framework has replaced Linq2Sql in Microsoft's technology stack, the philosophy behind the APIs remains the same. Whatever you've learned about Linq2Sql will help you in EF.
My observation is that ORMs are a lot more flexible on the data query side than on the data manipulation side. I tried Hibernate/nHibernate, Linq2Sql and EF, and in all cases the data retrieval was impeccable. Writing data back, however, was a different story: all frameworks are great when you modify your data in memory and then write it back, but you must jump through the hoops to implement mass inserts (e.g. table-to-table copies), updates, or deletes. Here is a good link that explains the issue and provides a work-around for Linq2Sql[^]. Good luck!
|
|
|
|
|
LINQ to SQL isn't "dead" dead, it is still being supported (and looks likely to remain so for a while) but no new features are being added. Microsoft is focusing on the Enitiy Framework, so that is worth a squizz and having used LINQ to SQL will help you
It is worth looking at the ADO stuff directly, but only so:
a) You understand the underlying technologies
b) You realise exactly how much the various LINQ database stuff is giving you.
Straight ADO was an (u)necessary pain. It is needed to get the data in and out (and therefore necessary). But then you had to work with the results sets, and they didn't play well in OO land.[^] so you had to write your own ORM or live with the fact you were working with relation data and forego a proper object model, without built-in support this was un unecessary pain.
|
|
|
|
|
I have a service written in C# that keeps exiting without any error message.
The only clue I have to the problem is that the thread exit code is FF .
Do you have any suggestions about how I can debug this?
---------------------------------------------------------
I have a lot of intertwined dependencies in this solution, and it turns out that some assemblies were using older builds of common assemblies than others. DUH!
Thanks for everyone's help on this matter.
The difficult we do right away...
...the impossible takes slightly longer.
modified on Friday, July 15, 2011 2:40 PM
|
|
|
|
|
Check the system event log.
Put a try/catch around the main processing loop and see if anything falls out.
Set an Application.UnhandledExceptionHandler (not sure if Application is available in services though).
|
|
|
|
|
Thank you. Those are great suggestions.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Debug - > Attach To Process
Also, log files are good.
|
|
|
|
|
I've tried that, and Visual Studio does not catch any exception at all.
It simply says, "XXXX Thread exited with code 0", "Process XXX has exited with code FF".
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I've used something like the following in my OnStart methods:
# if DEBUG
System.Threading.Thread.Sleep ( OneMinute ) ;
# endif
Which gave me enough time to attach the debugger after telling the Service to start.
|
|
|
|
|
Thank you, but Visual Studio does not catch any exception. The process simply quits. I have disabled the hosting process, but this made no difference.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Can you show us your
OnStart code?
|
|
|
|
|
Hi Shameel. The code is below, however the service quits as a response to a different service interacting with it through remoting. In other words, it starts up OK.
protected override void OnStart(string[] args)
{
try
{
RemotingConfiguration.Configure("Poller.dll.config", false);
}
catch (Exception ex)
{
StreamWriter Fs = new StreamWriter("PollStationError.log");
Fs.WriteLine(ex.ToString());
Fs.Close();
}
}
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|