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...
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 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...
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...
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...
We have a user who only uses the SQL Server 2000 database to run one or more DTS packages that reads from tables & exports the data. The user should be able to do nothing else.
In particular, we want to restrict the user from seeing - let alone modifying - any stored procedures, user-defined...
I've got a form named frmReportViewer, containing a CrystalReportViewer named crvReportViewer.
frmReportViewer is an all-purpose form, displaying whatever Crystal Report I tell it to programmatically on a button click event from various forms.
Some sample code:
Dim cur As Cursor =...
I've got a form that contains a Crystal Report Viewer control. Everything displays great!
But out of all the examples I've seen, nothing shows the best way to close the form and report.
I've set the ShowCloseButton property of the viewer to True, but the viewer's close button is grayed out...
I'm selecting data from SQL Server and attempting to insert it into an Excel workbook, by using ImportRow to copy data between two datatables (http://support.microsoft.com/kb/305346).
Both datatables are created ... and I'm able to append data from one datatable to the other. However, the...
I have two queries that run fairly quickly, and would like the results of each to appear in a single grid, without using a temp table.
Here's how I'm doing the selection ...
SELECT AcctNo, AcctName, SUM(TransAmt) AS Table1Total
FROM Table1
WHERE TransDate BETWEEN '4/1/08' AND '5/1/08'
GROUP BY...
I have a process that I'm converting to T-SQL from VBA (which of course uses looping), and I wanted to see if it could be used without touching each row.
Here's the situation. A payment is received. There are one or more line items against which the payment can be posted. (You may have seen...
The problem being encountered occurs in programming, but the base issue is strictly at the server level, so that's where I'm going to start searching :)
We've got a routine that requires users to log into Remote Desktop, and then copy a file from a local drive on their PC to a folder on the...
I'm able to create an XML file using WriteXml, and it looks just fine.
However, when I try to open it in Office applications using VBA, it gives an error that the format is invalid.
Is there any way to direct the output to persist in a format easily readable by Office VBA code?
Thought for...
I have an XML file that was created by a VB.NET routine.
When I try to open it as an ADO recordset in VBA, I get the following error:
(3709) The connection cannot be used to perform this operation. It is either closed or invalid in this context.
Code I'm using to attempt opening the XML as...
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.