This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DECLARE @object as int; | |
| DECLARE @hr as int | |
| DECLARE @ret AS INT | |
| DECLARE @status AS INT; | |
| DECLARE @statusText AS NVARCHAR(MAX); | |
| DECLARE @Header AS NVARCHAR(MAX); | |
| DECLARE @json as table(Json_Table nvarchar(MAX)); | |
| DECLARE @Method NVARCHAR(MAX) = 'POST'; | |
| DECLARE @ContentType NVARCHAR(MAX) = 'application/json'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pyodbc | |
| import time | |
| conn_str = "DRIVER={ODBC Driver 17 for SQL Server};SERVER=your_server;DATABASE=your_db;UID=your_user;PWD=your_password" | |
| while True: | |
| try: | |
| cnxn = pyodbc.connect(conn_str) | |
| cursor = cnxn.cursor() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Newtonsoft.Json; | |
| using Microsoft.AspNetCore.Mvc; | |
| [Route("api/[controller]")] | |
| [ApiController] | |
| class Program : ControllerBase | |
| { | |
| [HttpGet("/")] | |
| public IActionResult Index() | |
| { |