Generation

generate functionWed, 22 Mar 2023

dame el código necesario para conectar con una base de datos llamada Master que se encuentra alojada en el servidor DBMIR02

import pyodbc from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker conn = pyodbc.connect('DRIVER={SQL Server};SERVER=DBMIR02;DATABASE=Master;UID=user;PWD=password') engine = create_engine('mssql+pyodbc://user:password@DBMIR02/Master?driver=SQL+Server') Session = sessionmaker(bind=engine) session = Session() query = session.query()

Questions about programming?Chat with your personal AI assistant