If you want to do something with an exception - even ignore it, you'll need a catch regardless of performance. (which basically is only a factor if an exception occurs)
Been a very long time since I've done any DTD, however I'd say your example XML looks wrong to me.
Is that taken from a real example/requirement or is it just something you put together to try and...
It's different whether you use C# or VB.NET.
If using C# it is \ if I remember right (can also use @before a string)
If using VB.NET an additional " will escape the following ".
So the problem is with the input.
My guess is that you enter the number in some sort of culture specific value, say using comma as decimal point instead of period, or...
I'm unsure of what result you want, but the ToString method should be able to do it.
Check out:
http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx#DFormatString
and see if it helps.
If using SQL Server 2005 or higher, then the ROW_Number() can help you to avoid having to make the subqueries and MAX.
Just make something like
Row_Number() OVER (Partition By username Order By...
Have you tried connecting to the SQL server with SQL Management Studio?
It does not need to be installed on the server but can be installed on a client. It just needs to be able to connect to the...
My guess without parsing the entire thing through - you have a problem with your parenthesis. You do have a lot of them.
Properly the OR is interpreted wrong due to them.
You can connect to a SQL Server instance using SQL Server Management studio, if there's an open connection to it (needs to be exposed via an IP / Port number and have...
You need a property in your usercontrol (.ascx) to set the value of your label.
Then call that property from your page (.aspx) using the ID you gave the usercontrol.
Sorry, but I don't do other peoples homework.
If you wanted hints or suggestions - a forum like this is the place to go. If you want others to do your work; it's not the correct place.
Well - from the error message I'd say it isn't the query which is your problem.
But try to run it directly on the server to verify the query is correct.
FYI - but you might also want to look at the TryParse of the number values, which means you do not manually have to enclose the "Parse" in a Try/Catch block.