The invention discloses a SpreadJS table automatic generation and binding database table method, the realization process for its realization process is as follows: firstly, SpreadJS drawing table, specify the data binding region; the corresponding relation table of database tables and database configuration in the SpreadJS, constructed the SQL statement to create or modify a database table; SQL create or modify a database table; open the SpreadJS form, according to the relationship between the SpreadJS table and database query data, then the database table data in the specified data binding region display; when the SpreadJS table changes, repeat the above steps. Compared with the prior art, the invention of a SpreadJS table automatic generation and binding database table method, effective change in the encoding stage will set the SpreadJS table and the corresponding database table coded in the program, reduce the workload of maintenance and development program, strong practicability.
【技術實現步驟摘要】
一種SpreadJS表格自動生成并綁定數據庫表的方法
本專利技術涉及計算機應用
,具體地說是一種SpreadJS表格自動生成并綁定數據庫表的方法。
技術介紹
SpreadJS純前端表格控件是基于HTML5的JavaScript電子表格和網格功能控件,適用于.NET、Java和移動端等各平臺在線編輯類Excel功能的表格程序開發,具有友好的展示界面和強大的數據處理能力。數據庫(Database)是按照數據結構來組織、存儲和管理數據的倉庫,隨著信息技術和市場的發展,數據管理不再僅僅是存儲和管理數據,而轉變成用戶所需要的各種數據管理的方式。數據庫技術是管理信息系統、辦公自動化系統、決策支持系統等各類信息系統的核心部分,是進行科學研究和決策管理的重要技術手段。如果將SpreadJS純前端表格控件直接應用到web開發中,可以減少大量的編碼工作量,而通常企業管理軟件中數據的存儲都放到數據庫中,這就需要考慮SpreadJS表格與數據庫表的綁定問題,傳統的處理方式是編碼階段就將SpreadJS表格的設置與對應的數據庫表寫死在程序中,一旦改變表格的設置,對應的數據庫表,程序中針對此表格的處理也需要硬性編碼的變更方式,增加了程序的維護和開發工作量?;诖?,本專利技術提出一種SpreadJS表格自動生成并綁定數據庫表的方法,可以解決上述問題。
技術實現思路
本專利技術的技術任務是針對以上不足之處,提供一種SpreadJS表格自動生成并綁定數據庫表的方法。一種SpreadJS表格自動生成并綁定數據庫表的方法,其具體實現過程為:1)首先繪制SpreadJS表格,指定數據綁定區域; ...
【技術保護點】
一種SpreadJS表格自動生成并綁定數據庫表的方法,其特征在于,其實現過程為:其具體實現過程為:1)首先繪制SpreadJS表格,指定數據綁定區域;2)配置該SpreadJS表格與數據庫中數據庫表的對應關系,構建出創建或修改數據庫表的sql語句;3)執行sql語句創建或修改數據庫表;4)打開SpreadJS表格,根據SpreadJS表格與數據庫表的對應關系查詢出數據,然后將數據庫表中數據在指定數據綁定區域顯示;5)當SpreadJS表格發生變化時,重復以上步驟1)至4)。
【技術特征摘要】
1.一種SpreadJS表格自動生成并綁定數據庫表的方法,其特征在于,其實現過程為:其具體實現過程為:1)首先繪制SpreadJS表格,指定數據綁定區域;2)配置該SpreadJS表格與數據庫中數據庫表的對應關系,構建出創建或修改數據庫表的sql語句;3)執行sql語句創建或修改數據庫表;4)打開SpreadJS表格,根據SpreadJS表格與數據庫表的對應關系查詢出數據,然后將數據庫表中數據在指定數據綁定區域顯示;5)當SpreadJS表格發生變化時,重復以上步驟1)至4)。2.根據權利要求1所述的一種SpreadJS表格自動生成并綁定數據庫表的方法,其特征在于,所述步驟1)的SpreadJS表格繪制過程具體為:首先繪制SpreadJS表格顯示樣式,指定表格中需要綁定數據的域,確定表格綁定數據的開始行及對應列,設置綁定域中列的唯一標識,設置整列的數據類型,記錄設置信息。3.根據權利要求2所述的一種SpreadJS表格自動生成并綁定數據庫表的方法,其特征在于,構建出創建或修改數據庫表的sql語句的...
【專利技術屬性】
技術研發人員:張義法,
申請(專利權)人:濟南浪潮高新科技投資發展有限公司,
類型:發明
國別省市:山東,37
還沒有人留言評論。發表了對其他瀏覽者有用的留言會獲得科技券。