I tried to export one of global table from FlexSim to my local database. I use SQL Express free version for DB. The script I use is as follows;
//Script Starts***********************************************************************************
dbclose(); //In case
dbopen("BOBSTR", "select count(*) from [dbo].[BSOrders]", 0);
double numLines = dbgettablenum(1, 1);
Table tblItemRecord = reftable("ItemRecord");
//dbexporttable("ItemRecord", 1, 1, tblItemRecord.numRows, tblItemRecord.numCols);
dbexporttable("ItemRecord", 1, 1, 3, 3);
dbclose();
//Script Ends***********************************************************************************
I believe the connection is successfully done since I have correct 'numLines' return value. However, after 'dbexporttable' is executed, no tables are exported to BOBSTR database. I tested both (1) ItemRecord exists in BOBSTR DB and (2) ItemRecord not exists.
Does anybody have same or similar issue? Anyone can help me to export the global table? I am not sure what I missed. Thank you for your help much in advance.
ps. I think it would not help much to upload the model, since it is tied to my local DB. I hope someone can duplicate the issue using its own local DB. Thanks.