question

shanice.c avatar image
0 Likes"
shanice.c asked shanice.c commented

Database connector Exception: file is encrypted or is not a database


I try to import from database(thisistest.db) to GlobalTable1, the connection is successed, but couldn't import from database. I also tried to export globaltable content, it also display "unknown table list. Try testing the connection."

Did I miss anything so that it doesn't work? Since I have succeed with the same method before.


1630239898135.png


1630239378207.png


1630239857507.png

test database connetor.fsm

thisistest.7z

FlexSim 21.2.0
sqlflexsim 21.2.0database connector
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Phil BoBo avatar image
0 Likes"
Phil BoBo answered shanice.c commented

Your database file doesn't have any tables in it. It is a blank file.

Am I misunderstanding something? What did you expect it to do? What do you mean "[you] have succeeded with the same method before"? I don't understand.

If you want to import or export to a table, you need to actually have a table in the database. Try creating one:

1630498359558.png

test-database-connetor_1.fsm


· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Phil BoBo avatar image Phil BoBo ♦♦ commented ·

Edit: now I see that your zip file has a sql query in it. If I run that query to create a table in a database file, then it imports and exports just fine:

1630499491685.png

I'm confused as to what you are doing and what you expected to happen. (Perhaps because your attached images aren't working in the original question.)

0 Likes 0 ·
1630499491685.png (174.5 KiB)
shanice.c avatar image shanice.c Phil BoBo ♦♦ commented ·

@Phil BoBo Thanks for the reply. This was my first few times testing how to connect to database. It was myself unfamiliar with it, so that sometimes it worked, sometimes didn't. , I've tried using code to import and export as well, it's working well.

0 Likes 0 ·