class_docstr: This handler handles connection and execution of the Microsoft SQL Server statements. 
class_docstr_tok: ["This","handler","handles","connection","and","execution","of","the","Microsoft","SQL","Server","statements","."]
docstr: Receive SQL query and runs it
  :param query: The SQL query to run in SQL Server
  :return: returns the records from the current recordset
docstr_tok: ["Receive","SQL","query","and","runs","it",":","param","query",":","The","SQL","query","to","run","in","SQL","Server",":","return",":","returns","the","records","from","the","current","recordset"]
code: def native_query(self, query: str) -> Response:
      """
      Receive SQL query and runs it
      :param query: The SQL query to run in SQL Server
      :return: returns the records from the current recordset
      """
      need_to_close = self.is_connected is False
  
      connection = self.connect()
      # with closing(connection) as con:
      with connection.cursor(as_dict=True) as cur:
          try:
              cur.execute(query)
              result = cur.fetchall()
              if result:
                  response = Response(
                      RESPONSE_TYPE.TABLE,
                      data_frame=pd.DataFrame(
                          result,
                          columns=[x[0] for x in cur.description],
                      ),
                  )
              else:
                  response = Response(RESPONSE_TYPE.OK)
              connection.commit()
          except Exception as e:
              logger.error(
                  f"Error running query: {query} on {self.database}!"
              )
              response = Response(
                  RESPONSE_TYPE.ERROR, error_message=str(e)
              )
              connection.rollback()
  
      if need_to_close is True:
          self.disconnect()
  
      return response
  
file_path: mindsdb/mindsdb/integrations/handlers/mssql_handler/mssql_handler.py
imports: from contextlib import closing
  import pymssql
  import pandas
  from mindsdb_sql import parse_sql
  from mindsdb_sql.parser.ast.base import ASTNode
  from mindsdb.integrations.libs.base import DatabaseHandler
  from mindsdb.utilities import log
  from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender
  from mindsdb.integrations.libs.response import HandlerStatusResponse, HandlerResponse, RESPONSE_TYPE
label_desc: Use image node_id 5 for calling the SqlServerHandler obj's underlying member method code with example usage: obj.native_query(query) and returns: response