Hello! I have the following code:
set rsMsgs = server.CreateObject("adodb.recordset")
with rsMsgs.Fields
.Append "iMessageID", adInteger
.Append "iMessageIconID", adInteger
.Append "dtSent", adDBTimeStamp
.Append "iFromID", adInteger
.Append "tiSentArchive", adTinyInt
.Append "sFromToName", adLongVarChar,65538
.Append "sSubject", adVarChar,150
.Append "tiAttach", adTinyInt
.Append "tiUrgent", adTinyInt
.Append "tiAlert", adTinyInt
end with
rsMsgs.Open()
for preIndex = iRecFirst to iRecLast
rsMsgs.AddNew
rsMsgs("iMessageID") = arPreSort(0,preIndex)
rsMsgs("iMessageIconID") = arPreSort(1,preIndex)
rsMsgs("dtSent") = arPreSort(2,preIndex)
rsMsgs("iFromID") = arPreSort(3,preIndex)
rsMsgs("tiSentArchive") = arPreSort(4,preIndex)
rsMsgs("sFromToName") = arPreSort(5,preIndex)
rsMsgs("sSubject") = arPreSort(9,preIndex)
rsMsgs("tiAttach") = arPreSort(10,preIndex)
rsMsgs("tiUrgent") = arPreSort(11,preIndex)
rsMsgs("tiAlert") = arPreSort(12,preIndex)
rsMsgs.Update
next
rsMsgs.Sort = forderBy
I can sort on sSubject and dtSent without any problems. When I do a sort on the sFromToName field the recordset comes back as EOF. Does this have something to do with it being a LongVarChar that is so huge? How can I fix this?
set rsMsgs = server.CreateObject("adodb.recordset")
with rsMsgs.Fields
.Append "iMessageID", adInteger
.Append "iMessageIconID", adInteger
.Append "dtSent", adDBTimeStamp
.Append "iFromID", adInteger
.Append "tiSentArchive", adTinyInt
.Append "sFromToName", adLongVarChar,65538
.Append "sSubject", adVarChar,150
.Append "tiAttach", adTinyInt
.Append "tiUrgent", adTinyInt
.Append "tiAlert", adTinyInt
end with
rsMsgs.Open()
for preIndex = iRecFirst to iRecLast
rsMsgs.AddNew
rsMsgs("iMessageID") = arPreSort(0,preIndex)
rsMsgs("iMessageIconID") = arPreSort(1,preIndex)
rsMsgs("dtSent") = arPreSort(2,preIndex)
rsMsgs("iFromID") = arPreSort(3,preIndex)
rsMsgs("tiSentArchive") = arPreSort(4,preIndex)
rsMsgs("sFromToName") = arPreSort(5,preIndex)
rsMsgs("sSubject") = arPreSort(9,preIndex)
rsMsgs("tiAttach") = arPreSort(10,preIndex)
rsMsgs("tiUrgent") = arPreSort(11,preIndex)
rsMsgs("tiAlert") = arPreSort(12,preIndex)
rsMsgs.Update
next
rsMsgs.Sort = forderBy
I can sort on sSubject and dtSent without any problems. When I do a sort on the sFromToName field the recordset comes back as EOF. Does this have something to do with it being a LongVarChar that is so huge? How can I fix this?