By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,625 Members | 1,283 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,625 IT Pros & Developers. It's quick & easy.

Variant data type

P: n/a
I'm trying to convert a MS-Sql 6.5 VB application to SQL 2005 and vb.net.

The vb app has uses a variant data type. When I try to read the variant data
type from the sql 2005 database I get 8,000 characters into the variant
type, however when I use the 6.5 database I get only the limited number of
characters that are actually in the column.
Sep 16 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
empire5 wrote:
I'm trying to convert a MS-Sql 6.5 VB application to SQL 2005 and vb.net.

The vb app has uses a variant data type. When I try to read the variant data
type from the sql 2005 database I get 8,000 characters into the variant
type, however when I use the 6.5 database I get only the limited number of
characters that are actually in the column.
What exactly is the data type, and what do you do to read it?

--
Göran Andersson
_____
http://www.guffa.com
Sep 16 '07 #2

P: n/a
I take it you're talking about some sort of string data, correct? SQL Server
7.0 and later use Unicode characters by default. A Unicode character has
more than one byte. I would also suggest that you use a System.String to
read the data into. The only "equivalent" of a variant in the .Net Framework
is the System.Object class, and there are good reasons for using strong
typing.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"empire5" <a@b.comwrote in message
news:46***********************@roadrunner.com...
I'm trying to convert a MS-Sql 6.5 VB application to SQL 2005 and vb.net.

The vb app has uses a variant data type. When I try to read the variant
data type from the sql 2005 database I get 8,000 characters into the
variant type, however when I use the 6.5 database I get only the limited
number of characters that are actually in the column.


Sep 17 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.