Sends Transact-SQL text from the command buffer and sets up the statement for processing. This utility combines several functions into a single call.
SqlSendCmd% ( sqlconn%, cmd$ )
where
SUCCEED (1) or FAIL (0).
SqlSendCmd% performs several actions that process the Transact-SQL statements in the command buffer. SqlSendCmd% is equivalent to calling SqlCmd%, SqlExec%, and SqlResults%. SqlSendCmd% prepares the command for processing the first set of results but does not retrieve the first data row.
'Put commands into the command buffer. cmd$ = "SELECT db_name(dbid), dbid, size FROM sysusages" cmd$ = cmd$ " ORDER BY dbid" 'Send commands to SQL Server and start execution. Result% = SqlSendCmd%(SqlConn%,Cmd$)
SqlCmd%, SqlExec%, SqlResults%