PRB: DAO Recordset Name Property Is Limited to 256 CharactersLast reviewed: May 8, 1997Article ID: Q168194 |
The information in this article applies to:
SYMPTOMSThe Name property of a DAO Recordset object is limited to 256 characters. It only reports the first 256 characters of the SQL statement used to create the new Recordset. If the SQL statement is longer than 256 characters, and you refresh the Data Control in the code later on, you will receive one of the following errors:
"Run-time error '3061': Too few parameters. Expected 1" -or- "Run-time error '3075': Syntax error in string in query expression 'xxxx'" CAUSEWhen you set the Data Control's Recordset property to an existing Recordset, it obtains its RecordSource property from the DAO Recordset's Name property, which allows a maximum length of 256 characters.
RESOLUTIONStore the SQL statement into a string variable. Before refreshing the Data Control, set its RecordSource Property to this variable. For example:
Data1.RecordSource = SQLStr Data1.Refresh STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
|
Keywords : kberrmsg vb4all vb4win vb5all VBKBDAO VBKBDB VBKBJet VBKBObj kbprg
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |