CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
Wrong number of arguments or invalid property assignment: 'sql.commandtext'
- Article ID:
4240 - Date Created
Wednesday, March 30, 2022 - This Article Has been Viewed
398 times - Short Desc
When writing out parameterized queries, you may receive the following "Wrong number of arguments or invalid property assignment." - Details
The following error will happen during runtime when you have an error in your Classic ASP code when writing out your Parameterized Queries.Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: 'sql.commandtext'
/Header.asp, line 161 - Recreate Issue
The following code will give the "Wrong number of arguments" error.<%
sqlgetLM.commandtext "SELECT TOP colOne FROM TableOne"
%>
In the above line, we are missing an important object. - Resolve Issue
The proper way to write out the above Query Statement without error is.<%
sqlgetLM.commandtext = "SELECT TOP colOne FROM TableOne"
%>
Adding the = (equal) sign between the commandtext and Select Statement is the correct way to write out the above command.
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19544
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16825