|
-
Nov 15th, 2019, 08:02 PM
#9
Re: How to Sort Data Bound Combobox
 Originally Posted by wes4dbt
Sounds like it's not the best data type to use. Read this in MS Docs,
Those data types have been obsolete for at least a decade now - probably significantly more. Anyone who is using them for a new database is making a bad decision and almost certainly hasn't done enough reading.
 Originally Posted by ahmish
i have found a work around but there will be a lot of work for me. i will have to change my column format directly from database because i am currently using "TEXT" and i need to change it to "VARCHAR(MAX)" for me to be able to sort it using properties from the combobox.
That's not really a workaround. Your issue only exists because you used the wrong data type in the first place so this is the correct way to make the problem go away so no solution is required.
It concerns me that you're considering using varchar(max) though. If you are displaying these values in a ComboBox and sorting them, exactly how long do you expect them to be? Even 100 characters would be lot to display in a ComboBox. There's no way that a database column intended to contain values for display in a drop-down list needs to be varchar(max). Decide on a sensible maximum length for those values and specify that in the column definition. Start thinking a bit about your database schema.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|