Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. BFarley

    RAISERROR returns wrong line number of error in TRY/CATCH

    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...
  2. BFarley

    Log errors at application or database level?

    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...
  3. BFarley

    RAISERROR returns wrong line number of error in TRY/CATCH

    It's SQL Server 2008 Express. Bryant Farley "The Dude Abides
  4. BFarley

    RAISERROR returns wrong line number of error in TRY/CATCH

    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...
  5. BFarley

    Log errors at application or database level?

    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...
  6. BFarley

    NullReferenceException when using custom role provider

    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...
  7. BFarley

    NullReferenceException when using custom role provider

    Default.aspx.vb:line 13 refers to the line I posted originally MsgBox(Roles.IsUserInRole("tcallahan", "Administrator")) Bryant Farley "The Dude Abides
  8. BFarley

    NullReferenceException when using custom role provider

    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...
  9. BFarley

    Problem with custom role provider

    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...
  10. BFarley

    Best authentication method for this project ...

    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...
  11. BFarley

    Table setup questions when using HierarchyID

    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...
  12. BFarley

    Excel 2003: Unexpected option to save as Excel 2007

    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
  13. BFarley

    Excel 2003: Unexpected option to save as Excel 2007

    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...
  14. BFarley

    Help with sorting an array by a specific field

    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
  15. BFarley

    Help with sorting an array by a specific field

    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...
  16. BFarley

    Undo changing value of DatePicker control?

    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...
  17. BFarley

    Remove trailing blank line in text file

    Very effective solution that works like a charm! Thanks DaveInIowa and also everyone else that contributed their valued insight. Bryant Farley "The Dude Abides
  18. BFarley

    Remove trailing blank line in text file

    OUSoonerjoe ... what's the best way to strip the last CRLF as you suggested? Bryant Farley "The Dude Abides
  19. BFarley

    Remove trailing blank line in text file

    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...
  20. BFarley

    Remove trailing blank line in text file

    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...

Part and Inventory Search

Back
Top