Re: OleDb DataFactory bug. Watch out.
- From: "Bob" <bob@xxxxxxxxxxx>
- Date: Fri, 17 Nov 2006 12:33:44 +1300
Hi Nicholas,
re my previous reply.
Had the cuppa coffee.
decided to test for factory type.(I am using DbProviderFactories)
If System.Data.OleDb.OleDbFactory then I cast the sensitive DbParameter as
an OleDbParameter and set its OleDbType to VarChar.
Otherwise just set the DbType to String.
regards
Bob
"Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:Oqd3OlcCHHA.3604@xxxxxxxxxxxxxxxxxxxxxxx
Bob,for
I almost would NEVER use the OleDbFactory class to generate commands
me. SqlFactory is one thing, since it is tailored specifically for Sqlof
Server. However, OleDb has to deal with a plethora of different providers
(the same thing applies for the OdbcFactory as well).
Are you writing a general-purpose tool, or are you writing something
more specific?
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
"Bob" <bob@xxxxxxxxxxx> wrote in message
news:O72lg8bCHHA.3228@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
Using the OleDb factory.
Asked it to insert 4K records into a SQLAnywhere database table.
Runs out of steam at record 244 and starts writing corrupted versions
243 primary index column until at 248 it hits a variation it has already
written and fails with a non-unique primary index error.
Use a hand rolled OleDb command and the data is written OK. Likewise the
SQL
Factory writes the same data to an SQLServer OK.
It is not a race condition as you can step through the failing iteration
and
it still fails.
So...
Stay away from the OleDb Data factory until it is repaired.
Bob
.
- Follow-Ups:
- Re: OleDb DataFactory bug. Watch out.
- From: ssamuel
- Re: OleDb DataFactory bug. Watch out.
- References:
- OleDb DataFactory bug. Watch out.
- From: Bob
- Re: OleDb DataFactory bug. Watch out.
- From: Nicholas Paldino [.NET/C# MVP]
- OleDb DataFactory bug. Watch out.
- Prev by Date: Re: OleDb DataFactory bug. Watch out.
- Next by Date: Re: Problem appending a new element to xml file...
- Previous by thread: Re: OleDb DataFactory bug. Watch out.
- Next by thread: Re: OleDb DataFactory bug. Watch out.
- Index(es):
Relevant Pages
|