List Info

Thread: Which DbType to use for large binary fields (ntext)?




Which DbType to use for large binary fields (ntext)?
user name
2006-09-21 04:53:40
Hi all,

I'm working on some database code and I try to keep it
database-independent,
so I'm using DbType instead of the database-specific type
enums. The
documentation for DbType.Binary says:

"A variable-length stream of binary data ranging
between 1 and 8,000 bytes.
ADO.NET cannot correctly infer the type if the byte array is
larger than
8,000 bytes. Explicitly specify the DbType when working with
byte arrays
larger than 8,000 bytes."

This is unclear to me - what does it mean to explicitly
specify the DbType
for large arrays? What would be the DbType for an ntext
field? (The code
initally will use SQL Server, but I rather not use the
SqlDbType, if I don't
have to, since everything else in the code uses the
provider-independent
classes.)

Is this even possible to do with DbType or do I have to fall
back to using
SqlDbType?

Thanks,
Gyorgy Bozoki

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )