recordset.sort Problems with data types
From: Rasmus (Rasmus_at_nospam.nospam)
Date: 07/28/04
- Next message: Piglet: "VBA + MS SQL"
- Previous message: Marcel Gätzi: "Re: Reading Access DB: get someteimes Data - sometimes not"
- Next in thread: Kevin Yu [MSFT]: "RE: recordset.sort Problems with data types"
- Reply: Kevin Yu [MSFT]: "RE: recordset.sort Problems with data types"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 27 Jul 2004 23:27:05 -0700
In Visual Basic I’m doing the following:
Dim rsContent
Set rsContent = New ADODB.Recordset
rsContent.Fields.Append "Text", adVarWChar, 4000
rsContent.Fields.Append "LongText", adLongVarWChar, 32767
rsContent.Open
rsContent.AddNew
rsContent("Text").Value = "hello"
rsContent("LongText").Value = "here is a 30000 char long text"
rsContent.Update
rsContent.AddNew
rsContent("Text").Value = "hi"
rsContent("LongText").Value = "another long text"
rsContent.Update
Later in the code I need to do:
rsContent.Sort = “LongText”
and get the error.
Run-time error ‘-2147467259 (80004005)’:
Relate, Compute By, and Sort operations cannot be performed on column(s) whose defined size is unknown or to large.
I can do rsContent.Sort = “Text”
But that’s not what I need to do.
Is there another way I can accomplice this?
Regards,
Rasmus
- Next message: Piglet: "VBA + MS SQL"
- Previous message: Marcel Gätzi: "Re: Reading Access DB: get someteimes Data - sometimes not"
- Next in thread: Kevin Yu [MSFT]: "RE: recordset.sort Problems with data types"
- Reply: Kevin Yu [MSFT]: "RE: recordset.sort Problems with data types"
- Messages sorted by: [ date ] [ thread ]