rossmcloughlin
Programmer
Hi all,
This is my first time using this forum. I hope you can help me with a problem that must be fixed by the morning. The install date is tomorrow, and I can't get my head around the problem described below.
I use the RAISERROR statement in my update stored procedures. This was working fine in my production VB project. For example on one of my screens, the Applied date is required for all new records. On my production app, when I do not enter an Applied Date, I get the following error:
"Error: You must enter a valid Applied Date for new records
Source: Microsoft OLE DB Provider for SQL Server"
This is what I expected.
The code that handles the Error looks like:
-- Make sure that a valid Applied Date in entered
IF DATALENGTH(@Applied) = 0 OR @Applied Is Null
BEGIN
RAISERROR('You must enter a Date',16,1)
RETURN 0
END
However, when I compiled the project, I get a different error whenever I do not enter an Applied Date. The error does not make any sense. It is:
"Error: Method '~' of object '~' failed
Source: Grant Administration"
As you can see, the error is not being raised properly back to the client. I have gone into Tool|Options and set Error Handling to "Break on all Unhandled Errors". What am I missing?
Cheers...
Ross
This is my first time using this forum. I hope you can help me with a problem that must be fixed by the morning. The install date is tomorrow, and I can't get my head around the problem described below.
I use the RAISERROR statement in my update stored procedures. This was working fine in my production VB project. For example on one of my screens, the Applied date is required for all new records. On my production app, when I do not enter an Applied Date, I get the following error:
"Error: You must enter a valid Applied Date for new records
Source: Microsoft OLE DB Provider for SQL Server"
This is what I expected.
The code that handles the Error looks like:
-- Make sure that a valid Applied Date in entered
IF DATALENGTH(@Applied) = 0 OR @Applied Is Null
BEGIN
RAISERROR('You must enter a Date',16,1)
RETURN 0
END
However, when I compiled the project, I get a different error whenever I do not enter an Applied Date. The error does not make any sense. It is:
"Error: Method '~' of object '~' failed
Source: Grant Administration"
As you can see, the error is not being raised properly back to the client. I have gone into Tool|Options and set Error Handling to "Break on all Unhandled Errors". What am I missing?
Cheers...
Ross