OK, it's better. You use relative path to your file 'ex1', are you really sure that you open the right file and not creating another DB in another path ? Try to use absolute path (r'c:\temp\ex1').