Check for import error table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
Is there a simple way of checking if a import error table exists or not?
The background is we have a process where users import files and process the
data to output another file. This is all done through a form where the users
do not have access to the back end. However to keep things simple we have
turned of the warnings so the user may not be aware that import errors have
accounts.
I therefore am thinking of writing some code that will check if the error
table exists or not and inform the user through a message box or is there a
simpler way.
Tks
 
The following query will list any such tables:

SELECT MSysObjects.Name, MSysObjects.Type
FROM MSysObjects
WHERE MSysObjects.Name) Like "*ImportErrors"
AND MSysObjects.Type=1
ORDER BY MSysObjects.Name;

The following would count them up. You could do something if the
ImportErrorTables > 0.

SELECT Count(MSysObjects.Type) AS ImportErrorTables
FROM MSysObjects
WHERE MSysObjects.Name) Like "*ImportErrors"
GROUP BY MSysObjects.Type
HAVING MSysObjects.Type=1;
 
Correction!

If you used DTS then you wouldn't have to deal with such tedium!


Move to SQL Server, kids
 
Tks, worked a dream

Jerry Whittle said:
The following query will list any such tables:

SELECT MSysObjects.Name, MSysObjects.Type
FROM MSysObjects
WHERE MSysObjects.Name) Like "*ImportErrors"
AND MSysObjects.Type=1
ORDER BY MSysObjects.Name;

The following would count them up. You could do something if the
ImportErrorTables > 0.

SELECT Count(MSysObjects.Type) AS ImportErrorTables
FROM MSysObjects
WHERE MSysObjects.Name) Like "*ImportErrors"
GROUP BY MSysObjects.Type
HAVING MSysObjects.Type=1;
 
Hi Aaron Kempf. You sure are back with a vengence today. Got extra time on
your hands after being fired again?
 
I have a couple more basic questions: under what conditions is an import errors table created, and what do I need to do to see it? When I run the import I get a message telling me there are errors, and the help facility says that key violations should trigger an errors table, but I am not seeing them.

Many thanks.

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
I have a couple more basic questions: under what conditions is an import errors table
created, and what do I need to do to see it? When I run the import I get a message
telling me there are errors, and the help facility says that key violations should trigger
an errors table, but I am not seeing them.
Many thanks.

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com

Neil Gallagher,

A "Paste Errors" table should appear in the database's list of tables.


Sincerely,

Chris O.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top