Hi,

I am using two different select statements for two different pages but both selecting on the same table in MS Access 2003. Yet the output of SQLQuery 2 is truncating the output of the file_desc field to 255 chars. Any ideas? I have tried moving the file_data.file_desc field to the end of each section in SQLQuery 2 and that made no difference.

Cheers.

SQLQuery 1
Code:
 SQLQuery = "SELECT * FROM file_data WHERE file_id in( " & fileidVar & ") ORDER BY file_date DESC" 
SET RsBookmark = MakeRecordSet(cn,SQLQuery)
SQLQuery 2
Code:
 SQLQuery = " SELECT filegroup_data.filegroup_id, file_data.file_date, file_data.file_disp_id, file_data.file_title, file_data.file_id, file_data.file_desc, file_data.file_size, file_data.file_associated, file_data.file_type, filegroup_data.filegroup_name"
SQLQuery = SQLQuery & " FROM (filegroup_data INNER JOIN file_filegroup_link ON filegroup_data.filegroup_id = file_filegroup_link.filegroup_id) INNER JOIN file_data ON file_filegroup_link.file_id = file_data.file_id"
SQLQuery = SQLQuery & " GROUP BY filegroup_data.filegroup_id, file_data.file_date, file_data.file_disp_id, file_data.file_title, file_data.file_id, file_data.file_desc, file_data.file_size, file_data.file_associated, file_data.file_type, filegroup_data.filegroup_name"
SQLQuery = SQLQuery & " HAVING (((filegroup_data.filegroup_id)= " & request("group") & "))"
IF request("action") = "sort" THEN
SQLQuery = SQLQuery & " ORDER BY " & request("fField") & " " & request("fSort") & ""
QStringFilter = "&action=sort&fField=" & request("fField") & "&fSort=" & request("fSort") & "&group=" & request("group") & ""
orderby = request("fField")
sortby = request("fSort")
ELSE
QStringFilter = "&group=" & request("group") & ""
SQLQuery = SQLQuery & " ORDER BY file_data.file_date DESC"
END IF
Set RsFileList = Server.CreateObject("ADODB.Recordset")
RsFileList.CursorLocation = adUseClient
RsFileList.PageSize = 20
RsFileList.Open SQLQuery, cn, adOpenStatic, adLockOptimistic