#include "#SYSPATHMS4BI+\zInclude\includeChart.h"
#include "#SYSPATHMS4BI+\zInclude\IncludeDisplay.h"
;
** ****************************************************************************************** *
** MANDRAGORE PLANETE
** *******************************************************************************************
** <----Local_PC ------>
text NewDb :="#WWWMS4BISERVER+\Myms4bi.db";
integer msgsql;
DBDelete{MS4DB}(NewDb);
Display "------------------------------------------------------------------------- " ;
Display " Create DB " ;
Display "------------------------------------------------------------------------- " ;
DBconnect{Ado:"xlsx"}("#DRIVERSYS+\MandragorePlanete\MS4BI\02-DEMO-DESKTOP-BI-EXCELandSTANDARD\1-IMPORT-MAKE\example.xlsx");
IMPORT : New Ms4Db
BEGIN
DBconnect {Ms4DB} (NewDb) ,
Create:Table("[mytable]")
END
(" SELECT who$.firstname, who$.name, age$.age,age$.sex " +
" from [who$] " +
" INNER join [age$] ON who$.name = age$.name " );
display " Create View 1: [viewage] ";
Ms4_SQL{Ms4DB}("CREATE VIEW IF NOT EXISTS [viewage] AS " +
"SELECT name, age FROM [Mytable] ");
Sql_DestroyEnv();
DBBackup{Ms4db}(NewDb) to( "#WWWMS4BISERVERBACKUP+\Myms4bi.db") return (msgsql);
if(msgsql= 1)
then
display " BACKUP : ok #WWWMS4BISERVERBACKUP+ local WEB backup";
else
display " BACKUP : ko #WWWMS4BISERVERBACKUP+ local WEB backup";
end_if;
** <----Local_server ------>
DBconnect {Ms4DB} (NewDb) ;
Begin_Block_Rwd : full_page
;
FormPlus : DrawGrid, title :"MS4 DB : Myms4bi.db table : mytable " use table ("[mytable]") ;
FormPlus : DrawGrid, title :"MS4 DB : Myms4bi.db view : age " use View ("[viewage]") ;
End_Block_Rwd ;
** <----Local_PC ------>
Display " Create DB : End " ;
SetColorText(Hwdisplay:green,black) ;
Display " to continue, Click here ";
enter;