Your application initiates a language command by calling ct_command with type as CS_LANG_CMD and *buffer as the language text. For example, the call below initiates a language command to select rows from the authors table in the pubs2 database:
ret = ct_command(cmd, CS_LANG_CMD,
"select au_lname, city from pubs2..authors \
where state = 'CA'",
CS_NULLTERM, CS_UNUSED);
Language commands can take parameters. For Adaptive Server Enterprise client applications, parameter placement is indicated by undeclared variables in the command text. For example, a language command such as the one below takes a parameter whose value is substituted for “@state_name”:
select au_lname, city from pubs2..authors \ where state = @state_name
Parameters are useful when your code executes the same language command more than once.