It does return the correct line number if the ERROR_LINE value is captured (with the CATCH block) and is part of a concatenated error message.
Sample:
[code]
Msg 50000, Level 16, State 1, Procedure MyProcedure, Line 89
Divide by zero error encountered.:8134,55,MyProcedure
[/sample]
For a user...
Here's my thinking. If an error is thrown in a SQL stored procedure, it will be caught by error handling in ASP.NET (whether in page, BLL, or DAL) as SqlException.
Logging the SqlException will tell me exactly where to look in terms of stored procedure and line number.
In this case, other...
I have a stored procedure that uses the TRY/CATCH error handling. When an error occurs, the line number (ERROR_LINE) value is incorrect.
Msg 50000, Level 16, State 1, Procedure MyProcedure, Line 89
Divide by zero error encountered.
[/code'
First, this is the CATCH block:
BEGIN CATCH
SET...
My ASP.NET application uses a SQL Server 2008 database.
Very few data operations would happen outside of the ASP.NET interface, and then only by system admins on rare occasions.
Would there be any downside to logging errors from within ASP.NET only?
My thought is that I'd use the Exception...
Solved - in an unexpected way.
My role provider inherited SqlRoleProvider. For IsUserInRole, I used a modified version of the stored procedure aspnet_UsersInRoles_IsUserInRole, as I thought that the role provider would call it.
However, for IsUserInRole, it did not: instead, GetRolesForUser...
I have a custom role provider & custom membership provider on my app.
Membership works okay so far, but I get an error when I try to use the role provider.
I've verified that the username (tcallahan) is in the database, and a member of the role ("Administrators") that I'm checking.
Here's...
I created a custom role provider for my application, but it doesn't return the proper value for IsUserInRole.
Section of web.config that defines the provider:
<roleManager defaultProvider="MyTestAppRoleProvider" enabled="true">
<providers>
<clear/>
<add...
I started going down the path of forms authentication using SQL Server to store user/membership data, but came across a few stumbling blocks -- that led me to back up and decide whether or not that's even the best authentication method.
A bit of background: Each user may have the ability to...
We're creating a database to manage all activities associated with a contract (i.e. tasks, subtasks, and activities) and their associated costs.
The new HierarchyID data type looks like it will be a GREAT way to show relationships between tasks & associated subtasks etc, and allow flexibility...
I do have the Compatibility Pack for the Office 2007 System installed on my PC. However, none of the files on the remote server are in 2007 format.
It's interesting that it would default to that format in the 'Save As' dialog.
Bryant Farley
"The Dude Abides
I have several Excel 2003 (.XLS) files on a remote network drive. My local PC has Office 2003 apps, but not Office 2007.
If I navigate to the remote drive, right-click on an .XLS file, and click Save As, the available file types are all Excel 2007 (.XLSX, .XLSM, .XLSL).
I didn't expect to see...
Thanks for the input, guys -- got it to work perfectly using a datatable & dataview. I wanted to make sure I wasn't overlooking any available technology & shorter way around it.
Bryant Farley
"The Dude Abides
I have a text file that I have to work with frequently. It's submitted by a client, and I bring it into a VB.NET application to do various things.
Sample data:
DATE EMP JOBNO AMT
7/25/2008 12345 XYZ12345 5.99
7/22/2008 23456 XYZ12346 4.99...
I have a form with a Datepicker control. Once the date changes, there are some actions that need to be performed ... however, I'd like the user to be aware of these changes, and allow the user to cancel out, restoring the DatePicker's original value. This would be analogous I suppose to code...
Very effective solution that works like a charm!
Thanks DaveInIowa and also everyone else that contributed their valued insight.
Bryant Farley
"The Dude Abides
Using just write eliminates all carriage returns, not just the last one.
There will be occasions (hopefully the majority!) where the last line of the text file is in fact data, not just the carriage return. So ignoring the last line in all cases would not work.
Perhaps if I got the number of...
I have a comma delimited text file from which I'm reading. After I work the contents of each line & determine it's not a blank line, I write that line into a new text file. So the new file is the same as the original, except any blank lines have been removed.
My problem is that there is always...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.