Skip to content
Advertisement

Tag: python

Issue connecting to SQL Server via Python pyodbc

I have an ongoing issue that I just can’t solve. It concerns a Python script that loads data into a SQL server database. When I run it from my local machine it works fine, however when I run the same script from a server I get the following error: conn = pyodbc.connect(r’Driver={SQL Server};’ pyodbc.OperationalError: (‘08001’, ‘[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL

django get record which is latest and other column value

I have a model with some columns, between them there are 2 columns: equipment_id (a CharField) and date_saved (a DateTimeField). I have multiple rows with the same equipment_id and but different date_saved (each time the user saves the record I save the now date time). I want to retrieve the record that has a specific equipment_id and is the latest

python sqlite3 partial search

I want to do a partial search with python sqlite3. My initial query is: Then I tried using the LIKE keyword and string formatting to obtain partial search results for the title, like this: As in https://stackoverflow.com/a/20904256/13290801 This seems to do the trick for title, but now when searching on the other parameters, it’s not working at all although there

Problems passing a Python String to SQL query

I got some issues passing my SQL query made in Python to MS SQL. Were talking about retrieving some code via pyodbc, editing it with regex, and passing it back into a new table of the Database. I also tried some print()-Commands to assure the Code is running in Python and being edited the right way, but I am not

Advertisement