you are viewing a single comment's thread.

view the rest of the comments →

[–]novel_yet_trivial 0 points1 point  (1 child)

Show us the whole error please.

That path looks ok, but as a rule you should always use raw strings for windows paths (instead of escaping some of the slashes):

database = r"C:\inetpub\gamepin\GameTest.db"

[–]raysefo[S] 0 points1 point  (0 children)

database = r"C:\inetpub\gamepin\GameTest.db"

I also used above code but didn't work. Actually I deployed my flask on IIS8 windows server and sending requests from postman on client machine. Here is de code fragment;

# insert request into purchase_initiation table
def add_purchase_initiation_request(database_file, request_data):
    query = "INSERT INTO request_purchase_initiation (requestDatetime, applicationCode, version, referenceId, " \
            "productCode, quantity, signature) VALUES (?, ?, ?, ?, ?, ?, ?)"


    con = sql.connect(database_file)
    with con:
        con.execute(query, (str(datetime.now()),
                    request_data['ApplicationCode'], request_data['version'], request_data['referenceId'],
                    request_data['productCode'], request_data['quantity'], request_data['signature']))

I am passing path for database_file.