MS4BI®

MS4BI HELP 2022

by MS4script
01-Introduction
Preface & Copyright
Getting started
Informations + Cmd/param Server
Demos Simple
02- Declarations
Structure
Type
03- Instructions
Conditions if,do,while..
Char/Text functions Char or Text..()
Get + Include functions Get, Include..
String functions String# (hashtag)
Date-Time Day, Time, Year.
Display
Call
Formulas Complex
04- Database
Connector Ado, Odbc, Dsn, SAP, Ms4
DB Connect Create, delete
Import DataSource Import, Consolidation
Administration Admin, User
05- Sql-Query
Sql
Query Form : BTS,Plus
Grid option
06- Charts
Forms Plus, Win, Image, Excel, Morris...
Pie Std, Donut, 3D...
Bar Std, Stack, Line, Area, Plot
Radar
QrCode, Gauge
Step, Stock...
,Google,Leaflet... GeoMap
,Gantt,Timeline,Org.
DrawWindow [web]
07- Dashboard
Form tab, no tab
Responsive UI
08- Report
Report Hierarchy
Report Design
09- Filters
Dialogue + Call
10- Menus
Menu Design
Menu Frameset
Menu Custom
11-UI : Responsive
Tables Responsive,Frame,position
List Group
Text
Panel Header, body, Footer
Button Button, Progress Bar
Icon & Button
Collapse Group, Panel
Notifications
12- Encryption
Encrypt
Decrypt
13- Windows
Dialogue
Picture, Frame, Button..
MsgBox
Grid

Designer

00-OverView
01-Transaction
02-Setting
05-Import
10-Formula
15-Report-Part1
16-Report-Part2
20-Query-Part1
21-Query-Part2
25-Report-Query-Style
30-QrCodeImage
31-Windows
32-Frame
40-TabStrip
50-Collapse
60-BeginForm
63-Input-SubmitBox
70-Input-Select
71-Input-Insert
72-Input-Update
73-Input-Delete
75-Input-Query
77-ListComBo
81-Button-Link
82-Button-DataList
86-Sticky-Label
91-Insert-PhpJsHtml
92-Insert-MS4script
15- Css, html, Php, js.
Insert Native language Begin_sw..End_Sw
16-Install + tools.
Installation & Configuration This Menu
Generate Native... Php, Html, js..
Code Generator Ms4 Script
MarkDown Ms4 Script
Source Code Menu Help This Menu
written with ms4script
      

BASIC HELP : MS4BI by MS4script

2022 version 1.10

Chapter 4 : DATABASES

KEYWORD : IMPORT NEW DB

:

Definition

- Imports a file or table from an ADO, ODBC, DSN, or SAP data source
- Creates and adds a table to an MS4DB database

Syntax

  		 
			DBconnect{Driver}( NameDB1  );
			  IMPORT : NEW MS4DB   
		      BEGIN  
        		 	  DBconnect {Ms4DB} (DB Name MS4BI )  , 
		    		  Create:Table(Table Name XXXX MS4BI) 
			  END 
				(" SELECT   * from	tableName / NameDB1     " ) ;	
	

Example

  		   
 ** <Local_PC >
  text NewDb :="#WWWMS4BISERVER+\Myms4bi.db";
   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  "  );


	

Remarks

Excel : sheet : [NameSheet$] : the $ is required to be able to access the sheet

See also

DBCONNECT, CREATEDB ,TABLEEXIST , DBDELETE,DBBACKUP, MS4_SQL, Sql_DestroyEnv



KEYWORD : IMPORT NEW DB CONSOLIDATION

:

Definition

- Imports and consolidates

several files or tables

from ADO, ODBC, DSN, SAP data sources
- Creates and inserts all of the files or tables into a single table in a MS4DB database.

Syntax

  		 
			DBconnect{Driver}(Consolidated Table Name);
			  IMPORT : NEW MS4DB   
		      BEGIN  
        		 	  DBconnect {Ms4DB} (DB Name)  , 
		    		  Create:Table(Table Name ) 
			  END 
				(" SELECT   * from	      " ) ;	
	

Example

  		   
BEGIN  CONSOLIDATION  tables : japanese and chinese -> into  Excel table temp  * 
 SetUniCode(1);
** sheet 1 
 	DBconnect{Ado:"xls"}( LFile1Excel);
 	display "insert Table Japanese : CONSOLIDATION 1  ";
  	Ms4_SQL{Ado:"xls"}(" SELECT  * into " + " %s " + "  from [中国最大の都市のリスト$]", Table1SheetJapanese) return x ;
  
** sheet 2 
 	DBconnect{Ado:"xls"}(Lfile2Excel);
	display "insert Table Chinese : CONSOLIDATION 2   ";
	Ms4_SQL{Ado:"xls"}(" SELECT  * into  %s " + " from [Sheet1$]",Table1SheetChinese) return x;
  	
END ;
  BEGIN ** Create a new table in MS4 DB
 ** *******************************************************************	
 ** INSERT a FILE xls, xlsx, txt ..etc into MS4 DB
 ** Create Cube : ms4LangConsolidation Example
 ** *******************************************************************	
			DBconnect{Ado:"xls"}(Table1);  /* Consolidation table!! lang1$ + lang2$ */
			  IMPORT : New Ms4Db   
		      BEGIN  
        		 	  DBconnect {Ms4DB} (Lcurrentdb)  , 
		    		  Create:Table("[ms4LangConsolidation]") 
			  END  
				(" SELECT   a.SNO , 都市名 as CityName, 英語 as CityEnglish, POPULATION ,"+
				 " 備考 as proforma, CITY  , 城市 As CityChinese, "+
				 " PROVINCE, PREFECTURE  , TYPELevel , FOUNDED ,b.sno as snoduplicate" +
				 " from  [lang1$] as a  ,[lang2$] as b   " +
				        " where  a.英語 = b.city order by   b.city  "  );
    END ;						
	
Visualise Example : Import Consolidation DB
Visualise Example : Create View DB

Prerequisites

- Create a single EXCEL file where each sheet is the table copied by the instruction Ms4_SQL{Ado:"xls"}(" SELECT * into ......... file 1 or table 1
- When importing into the MS4DB database, create the relationship(s) with each sheets using the instruction WHERE a = b and b =c ...

Remarks

Excel : sheet : [NameSheet$] : The $ is required to access the sheet

ALL Examples Imports/connections :

driver::\MandragorePlanete\MS4BI\zConnectorsx-Import\Examples

See also

DBCONNECT, CREATEDB, TABLEEXIST, DBDELETE,DBBACKUP,Sql_DestroyEnv



Interested in joining us? contact@mgplanete.com
The Mg Planete team


Copyright 2022 by Mandragore Planete

the official sites :
mgplanete.com
getms4bi.com
demos.ms4bi.com
help.ms4bi.com
ms4script.com

Download

official site :
getms4bi.com

Our purpose : Keep it simple !


written with ms4script
  • help 01.010.2022.8

MS4BI in 5 minutes