Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

function argument value, type or count is invalid

Status
Not open for further replies.

bharons

Technical User
Jan 23, 2019
49
ID
dear expert..
i have some value on sql server with data type decimals, when i use this statement on vfp 8
thisform.text3.value = subs(val(thisform.txtvalue),4,2)
or
thisform.text3.value = subs(tranform(thisform.txtvalue),4,2)
both text3 or txtvalue with value property are none
i got massage that function argument value, type or count is invalid

can someone explain me, why i got that massage.. 🙏 🙏
 
Hi bharons

the vartype of the argument of substr() is character.

SUBSTR( ) Function
SUBSTR(cExpression, nStartPosition [, nCharactersReturned])

You are using the val() function in the argument of substr() and the result of val() is numerical (not character).
 
As far as I know, there is no subs() or substr() function in SQL Server (there is a substr() function in Oracle)

But, there is the SQL Server SUBSTRING() Function in SQL Server

BTW - this is MySQL forum, a little different 'animal'
 
As far as I know, there is no subs() or substr() function in SQL Server (there is a substr() function in Oracle)

But, there is the SQL Server SUBSTRING() Function in SQL Server

BTW - this is MySQL forum, a little different 'animal'
thanks so much for solution Andrze... :giggle::giggle:
after i read massage from chrish.. after and after again.. i learn some thing that i have miss match with command to execute it with :
SUBS(transform(THISFORM.TXTKEY.VALUE), 4, 2) = '11'.. and theres no more error, by this statement i have value is character datatype, i just wondering can i have that value in numeric datatype..:unsure:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top