Thursday, March 22, 2012

Error: -2147217900

Howdy People,

If there is a FAQ for this, could someone point me to it, otherwise, here is
my problem.

I'm running an extremely simple (or so I though) vbscript which uses ADO to
update an SQL Server table from a text file. The script reads the file line
by line and for each line it performs a delete on the database with a
statement like the following:

DELETE FROM MyTable WHERE MyField = '3794'

What could be simpler eh? In a table containing over 3000 rows, 8 rows fail
with the following error code:

-2147217900

There is so error source or description. Each time it is the same 8 queries
which fail. The statements which fail can be run just fine using Query
Analyzer.

I'd be grateful for any thoughts.

Mike BPerhaps it could that the rows dont exist in the
SQL Server table, or perhaps that you have
duplicate records somewhere.

What results does the following script return:

select myField, count(*)
from mytable
group by myField
having count(*)>1
order by 2 desc

Pete Brown
Falls Creek
Oz

"mike netspace.net.au>" <transam@.<REMOVETHISINCLUDINGBRACKETS> wrote in
message news:400736db$1@.dnews.tpgi.com.au...
> Howdy People,
> If there is a FAQ for this, could someone point me to it, otherwise, here
is
> my problem.
> I'm running an extremely simple (or so I though) vbscript which uses ADO
to
> update an SQL Server table from a text file. The script reads the file
line
> by line and for each line it performs a delete on the database with a
> statement like the following:
> DELETE FROM MyTable WHERE MyField = '3794'
> What could be simpler eh? In a table containing over 3000 rows, 8 rows
fail
> with the following error code:
> -2147217900
> There is so error source or description. Each time it is the same 8
queries
> which fail. The statements which fail can be run just fine using Query
> Analyzer.
> I'd be grateful for any thoughts.
> Mike B
>
>

No comments:

Post a Comment