// Prepare the statement. Use the $options array to turn off the// default behavior, which is to send all stream data at the time of query// execution.$options = array("SendStreamParamsAtExec"=>0);$stmt = sqlsrv_prepare( $conn, $sql, $params, $options);

sqlsrv_execute( $stmt);

// Send up to 8K of parameter data to the server // with each call to sqlsrv_send_stream_data.$i = 1;while( sqlsrv_send_stream_data( $stmt)) {$i++;}echo "$i calls were made.";?>