Passing parameters not being recognized and throws SQL error when executing raw query (on SQL-Server database and Pymssql) with SqlAlchemy
问题 I'm trying to execute simple raw SQL query, on SQL-Server db with SqlAlchemy (and Pymssql as provider). Here is my first try (using execute method of connection and passing parameters in **kwargs way): provider = DataProvider().engine q = "select url from Crawler.CrawlSource where source=@source" query = text(q) result = provider.connect().execute(query, source ='mysource') I passed the parameters in any way shown in tutorials (passing as kwargs and passing as dict) but neither of them worked