Take out the on error resume next. Then, after you (try to) open your connection, do this<BR><BR>cn.Open ...<BR>for each erx in cn.Errors<BR>response.write erx.Number & "/" & erx.Description & "</p><p>"<BR>next
Thanks for answering me but I tried and it doesn't work-<BR>what hapening is that I get the OLE DB Provider error before I catch<BR>it like this:<BR>Try to create table that already exist and want to catch the error:<BR>sub CreateTables() <BR>this what I get:<BR>Microsoft OLE DB Provider for SQL Server (0x80040E14)<BR>There is already an object named 'tblClients' in the database.<BR>and it doesn't get to the code of printing the error like you'v showed me.<BR>thanks a lot Carmen<BR>
Looks like I gave you a bum steer. Put your on error resume next into the CreateTables subroutine. Then copy the error trapping code into the same routine, immediately after the statement where you try to create the table. (That will catch your error.) Then add the line On Error Goto 0. I think that will do what you want.