Where is the default save location for Python-SQlite3 files... Can the user modify the storage location...?

Asked 2 years ago, Updated 2 years ago, 93 views

Hello, I am an ordinary person who learns programming as a hobby. I have a few questions for you.

I'm going to use SQlite3 to store data made of pythons this time.

conn = sqlite3.connect('Test.db')

It's said to create a file and connect it at first. Test.db Where is the default storage location? I'm asking if the programmer can't change the path to the storage location on the coding.

python sqlite3

2022-09-22 18:56

1 Answers

I want to change the location where I save the file in the codeCotton

conn = sqlite3.connect ('C:\\Owner\\Desktop\\Test.db')

Although the above code is not the code to store the file, as an example,

You can attach the address of the location you want to save as above.


2022-09-22 18:56

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.