Hi there,
I have an ASP page here that I'm using to insert records into an Access database. I want to do some error handling cause I know there are going to be users who will try and enter duplicate records. When access returns the error saying that a record already exists I'd like to catch that and show the user in a nicer way than the standard IE error page. I am trying to enter duplicate data and have the code below but it doesn't show me anything beside the standard error page, what am I doing wrong? I've created the error
I have this code:
Dim objErr
Set objErr = Server.CreateObject("ADODB.Error")
'all the standard stuff here
strSql = "insert into facilitator".......... blah blah
rs.open strSql, adoCon 'execute the command
for each objErr in adoCon
response.write(objErr.Description)
next
I get nothing but that standard error page, any help?
I have an ASP page here that I'm using to insert records into an Access database. I want to do some error handling cause I know there are going to be users who will try and enter duplicate records. When access returns the error saying that a record already exists I'd like to catch that and show the user in a nicer way than the standard IE error page. I am trying to enter duplicate data and have the code below but it doesn't show me anything beside the standard error page, what am I doing wrong? I've created the error
I have this code:
Dim objErr
Set objErr = Server.CreateObject("ADODB.Error")
'all the standard stuff here
strSql = "insert into facilitator".......... blah blah
rs.open strSql, adoCon 'execute the command
for each objErr in adoCon
response.write(objErr.Description)
next
I get nothing but that standard error page, any help?