August 26, 2003 at 7:07 pm
Hi,
Sorry for the cross-post. I meant to post my message in this forum originally.
Can someone please enlighten me as to what the error message "Invalid Descriptor Index" means? I know that it has to do with a column in my table that has a data type of text and length of 16. I am trying to extract this column into my VB program. The values are being extracted correctly on the first pass, but in subsequent calls it always returns null. If I change the column to a varchar, I do not get this problem. Unfortunately though, I need the data type to be text.
Also, someone once taught me that columns with a data type of text should always be the last columns in your table. They should also be the last columns in any SQL queries. I have confirmed this as I was experiencing a problem whereby the values of some columns were dropping from sight after adding a column to a query. After I moved the column to before the text columns, all was well. Does anyone know why this is? What is up with this text data type?
August 27, 2003 at 1:35 am
Read SQL Server Books Online(2000) about TEXT types, "sp_tableoption 'Text in row'",READTEXT, WRITETEXT and TEXTPTR.
August 27, 2003 at 1:47 am
Hi donnapep,
can you post your VB code?
I use text columns frequently in VB and never noticed any problems.
I think a new feature was introduced in SQL2k that you can use a 'text in row' option on a table. If you have this enabled, the text data is actually stored in the data row. If you have not enabled this, only a pointer to the text data is stored in the data row, while the actual text data is stored outside the data row.
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
August 27, 2003 at 2:18 am
FROM BOL 🙂
The Microsoft® SQL Server™ ntext, text, and image data types are capable of holding extremely large amounts of data (up to 2 GB) in a single value.
If an ntext, text, and image data value is no longer than a Unicode, character, or binary string (4,000 characters, 8,000
characters, 8,000 bytes respectively), the value can be referenced in SELECT, UPDATE, and INSERT statements much the same way as the smaller data types
When the ntext, text, and image data values get larger, however, they must be handled on a block-by-block basis. Both Transact-SQL and the database APIs contain functions that allow applications to work with ntext, text, and image data block by block.
In Microsoft SQL Server 2000, users can enable a text in row option on a table so it could store text, ntext, or image data in its data row.
Unless the text in row option is specified, text, ntext, or image strings are stored outside a data row; only the text pointers to these strings reside in the data rows.
I hope all this copy & paste helped you.
Pay Respect to People on your way up. For you will meet the same People on your way down.
He who knows others is learned but the wise one is one who knows himself.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply