CN102053822A - Method and device for connecting Java information platform and SQL Server database - Google Patents
Method and device for connecting Java information platform and SQL Server database Download PDFInfo
- Publication number
- CN102053822A CN102053822A CN2009101977624A CN200910197762A CN102053822A CN 102053822 A CN102053822 A CN 102053822A CN 2009101977624 A CN2009101977624 A CN 2009101977624A CN 200910197762 A CN200910197762 A CN 200910197762A CN 102053822 A CN102053822 A CN 102053822A
- Authority
- CN
- China
- Prior art keywords
- database
- sql server
- login
- server database
- user
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method and a device for connecting a Java information platform and a structured query language (SQL) Server database. The method comprises the following steps of: providing a login interface of the SQL Server database for a user of the information platform to log in the database, then loading the drive of an application program interface of the SQL Server database, acquiring a connection through the application program interface of the SQL Server database, logging in the database through the connection, sending SQL statements to the database after the login of the user, and processing results returned by the database.
Description
Technical field
The present invention relates to field of information system, particularly a kind of Java information platform connects the method and the device of SQL Server database.
Background technology
Along with making rapid progress of technology, simple use data base administration data can not satisfy the demands, how can more effective use database, select to be fit to the database in own field, and how can more effectively inquire about, revise data, and adding rapid development of network, the memory space on the website is also increasing, the problem of accumulating over a long period of the information processing that these caused all is the huge challenge that database development is now faced.
The semi-invariant of the database data of many business and governments department inside is increasing, and the phenomenon of information island is also more and more serious, and these have hindered infosystem and have further developed.Data between infosystem and each database need exchange at any time, and this becomes one than exigence with regard to the technology that makes information platform connect database.
Summary of the invention
The purpose of this invention is to provide method and device that a kind of Java information platform connects SQL Server database, it can make information platform connect described database swimmingly.
On the one hand, the invention provides the method that a kind of Java information platform connects SQL Server database, may further comprise the steps:
1.1, the login interface of described SQL Server database is provided, login described database for the user of described information platform;
1.2, load the driving of described SQL Server database api;
1.3, obtain a connection by described SQL Server database api, connect the described database of login by this;
1.4, after the user login, send SQL statement, and the result that returns of processing said data storehouse to described database.
The login interface of the SQL Server database in the described step 1.1 carries out authentication by SQL Server authentication pattern or windows identity verification mode to described user.
The driving of the described SQL Server database api that described step 1.2 loads comprises a parameter character string, and described parameter character string further comprises the bag name and the class name of described driving.
The form that connects in the described step 1.3 is: connection string, and login username, login password, the content of described connection string comprises the port numbers that described database server title and database use.
On the other hand, the present invention also provides a kind of Java information platform to connect the device of SQL Server database, comprising:
User authentication unit in order to the login interface of described SQL Server database to be provided, supplies the user of described information platform to login described database;
Loading unit is in order to load the driving of described SQL Server database api;
Linkage unit in order to obtain a connection by described SQL Server database api, connects the described database of login by this;
Performance element in order to after user login, sends SQL statement to described database, and the result that returns of processing said data storehouse.
The login interface of the SQL Server database that described user authentication unit provides carries out authentication by SQLServer authentication pattern or windows identity verification mode to described user.
The driving of the described SQL Server database api that described loading unit loads comprises a parameter character string, and described parameter character string further comprises the bag name and the class name of described driving.
The form of the connection that described linkage unit obtains is: connection string, and login username, login password, the content of described connection string comprises the port numbers that described database server title and database use.
Adopt a kind of Java information platform of the present invention to connect the method and the device of SQL Server database, the login interface of described SQL Server database at first is provided, user for described information platform logins described database, load the driving of described SQL Server database api then, and by connection of described SQL Server database api acquisition, connect the described database of login by this, after user's login, send SQL statement to described database, and the result that returns of processing said data storehouse.
Description of drawings
Fig. 1 is the process flow diagram of the method for the invention.
Fig. 2 is the theory diagram of device of the present invention.
Embodiment
Further specify technical scheme of the present invention below in conjunction with drawings and Examples.
At first introduce SQL Server database, SQL Server is the relational database management system (DBMS) by Microsoft exploitation and popularization, it is developed jointly by Microsoft, Sybase and Ashton-Tate three companies at first, and has released first OS/2 version in 1988.SQL Server brings in constant renewal in version in recent years, and 1996, Microsoft released SQL Server 6.5 versions; 1998, SQL Server 7.0 versions were met with the user.In the present embodiment, be that example is described with SQL Sever 2005.
The characteristics of SQL Server:
1. real client/server architecture.
2. graphic user interface makes system management and data base administration directly perceived more, simple.
3. Feng Fu DLL (dynamic link library) instrument provides bigger choice for the user carries out program design.
4.SQL Server and Windows NT are fully-integrated, have utilized many functions of NT, as sending and accept message, administrative login security etc.SQL Server also can be integrated with Microsoft BackOffice product well.
5. have good retractility, can cross over from the kneetop computer of operation Windows 95/98 and use to the kinds of platform such as large-scale multiprocessor of operation Windows 2000.
6. to the support of Web technology, the user can be published to the data in the database on the Web page at an easy rate.
7.SQL Server provides the data warehouse function, this function only just has in Oracle and other more expensive DBMS.
Referring to Fig. 1, Fig. 1 is the method 100 that a kind of Java information platform of the present invention connects SQL Server database, may further comprise the steps:
101, the login interface of described SQL Server database is provided, supplies the user of described information platform to login described database.
Can use two kinds of authentications when login SQL Sever 2005, windows checking and SQLSever authentication are the authentication of SQL Sever as used herein, and user name and password are sa and 111.Because when adopting the windows authentication, program can only be moved, and does not adopt SQL Sever to verify, to add also that when writing the connection code connecting word string " Trusted_Connection=yes " is the integrated verification mode on this diji.
102, load the driving of described SQL Server database api.
The driving of the described SQL Server database api that described step 102 loads comprises a parameter character string, and described parameter character string further comprises the bag name and the class name of described driving.
103, obtain a connection by described SQL Server database api, connect the described database of login by this.
As an embodiment, the form that connects in the described step 103 is: connection string, and login username, login password, the content of described connection string comprises the port numbers that described database server title and database use.
Connect SQL Server database with Java, the statement in load driver and URL path is in SQL Server 2000
The statement of load driver and URL then is among the SQL Server 2005
If the literary style mistake will can not find driving.And the driving jar bag of JDBC connection, in installation directory, not, therefore also needing to download again on the net, the jar bag is called sqljdbc.jar.
104, after the user login, send SQL statement to described database, and the result that returns of processing said data storehouse.
Referring to Fig. 2, Fig. 2 has shown that a kind of Java information platform connects the device 200 of SQL Server database, comprising:
User authentication unit 210 in order to the login interface of described SQL Server database 250 to be provided, supplies the user of described information platform to login described database 250.
Loading unit 220 is in order to load the driving of described SQL Server database 250 application programming interfaces.
Linkage unit 230 in order to obtain a connection by described SQL Server database 250 application programming interfaces, connects the described database 250 of login by this.
Performance element 240 in order to after user login, sends SQL statement to described database 250, and the result that returns of processing said data storehouse 250.
The login interface of the SQL Server database 250 that described user authentication unit 210 provides carries out authentication by SQL Server authentication pattern or windows identity verification mode to described user.The driving of described SQL Server database 250 application programming interfaces that described loading unit 220 loads comprises a parameter character string, and described parameter character string further comprises the bag name and the class name of described driving.The form of the connection that described linkage unit 230 obtains is: connection string, and login username, login password, the content of described connection string comprises the port numbers that described database 250 server names and database 250 use.
It is to be noted, the device 200 of a kind of Java information platform connection SQL Server database of the present invention is connected the method 100 of SQL Server database with described a kind of Java information platform, both are identical or similar on principle and embodiment, so repeating part repeats no more.
Those of ordinary skill in the art will be appreciated that, above embodiment is used for illustrating the present invention, and be not to be used as limitation of the invention, as long as in connotation scope of the present invention, all will drop in claims scope of the present invention variation, the modification of above embodiment.
Claims (8)
1. the method for a Java information platform connection SQL Server database is characterized in that, may further comprise the steps:
1.1, the login interface of described SQL Server database is provided, login described database for the user of described information platform;
1.2, load the driving of described SQL Server database api;
1.3, obtain a connection by described SQL Server database api, connect the described database of login by this;
1.4, after the user login, send SQL statement, and the result that returns of processing said data storehouse to described database.
2. the method for claim 1 is characterized in that, the login interface of the SQL Server database in the described step 1.1 carries out authentication by SQL Server authentication pattern or windows identity verification mode to described user.
3. method as claimed in claim 2 is characterized in that, the driving of the described SQLServer database api that described step 1.2 loads comprises a parameter character string, and described parameter character string further comprises the bag name and the class name of described driving.
4. method as claimed in claim 3, it is characterized in that the form that connects in the described step 1.3 is: connection string, login username, login password, the content of described connection string comprise the port numbers that described database server title and database use.
5. the device of a Java information platform connection SQL Server database is characterized in that, comprising:
User authentication unit in order to the login interface of described SQL Server database to be provided, supplies the user of described information platform to login described database;
Loading unit is in order to load the driving of described SQL Server database api;
Linkage unit in order to obtain a connection by described SQL Server database api, connects the described database of login by this;
Performance element in order to after user login, sends SQL statement to described database, and the result that returns of processing said data storehouse.
6. device as claimed in claim 5 is characterized in that, the login interface of the SQL Server database that described user authentication unit provides carries out authentication by SQL Server authentication pattern or windows identity verification mode to described user.
7. device as claimed in claim 6 is characterized in that, the driving of the described SQL Server database api that described loading unit loads comprises a parameter character string, and described parameter character string further comprises the bag name and the class name of described driving.
8. device as claimed in claim 7, it is characterized in that the form of the connection that described linkage unit obtains is: connection string, login username, login password, the content of described connection string comprise the port numbers that described database server title and database use.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009101977624A CN102053822A (en) | 2009-10-27 | 2009-10-27 | Method and device for connecting Java information platform and SQL Server database |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009101977624A CN102053822A (en) | 2009-10-27 | 2009-10-27 | Method and device for connecting Java information platform and SQL Server database |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102053822A true CN102053822A (en) | 2011-05-11 |
Family
ID=43958182
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009101977624A Pending CN102053822A (en) | 2009-10-27 | 2009-10-27 | Method and device for connecting Java information platform and SQL Server database |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102053822A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103473311A (en) * | 2013-09-11 | 2013-12-25 | 北京新学堂网络科技有限公司 | Method and device for introducing external database into HTML5 application |
-
2009
- 2009-10-27 CN CN2009101977624A patent/CN102053822A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103473311A (en) * | 2013-09-11 | 2013-12-25 | 北京新学堂网络科技有限公司 | Method and device for introducing external database into HTML5 application |
CN103473311B (en) * | 2013-09-11 | 2016-10-12 | 北京新学堂网络科技有限公司 | A kind of method and device introducing external data base in HTML5 applies |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7418665B2 (en) | Portable cross platform database accessing method and system | |
US9686374B2 (en) | System and method for fragment level dynamic content regeneration | |
US6633311B1 (en) | E-service to manage and export contact information | |
US8370828B2 (en) | Techniques to perform gradual upgrades | |
US9203916B2 (en) | Methods and system for tracking web page analytics | |
CN101441688B (en) | A kind of user right distribution method and a kind of user authority control method | |
US9081805B1 (en) | Tenant-aware database for software as a service | |
CN110196971A (en) | Online document edit methods, device, terminal device and storage medium | |
US6996798B2 (en) | Automatically deriving an application specification from a web-based application | |
JP2001282594A (en) | Corporate work integration system and method for integrating a plurality of data sources | |
US7877417B2 (en) | Method and apparatus for exchanging data with a database | |
US20100185597A1 (en) | Method and Apparatus for Optimistic Locking Using SQL Select, Update, Delete, and Insert Statements | |
CN101221568A (en) | Method and system for data access | |
CN101727320A (en) | Method and tools for identifying impact of database changes on an application | |
US10503923B1 (en) | Centralized data store for multiple data processing environments | |
AU2005202279A1 (en) | Method, system, and apparatus for discovering and connecting to data sources | |
CN104142930A (en) | Universal Delta data loading technology | |
CN105589959A (en) | Form processing method and form processing system | |
US10248668B2 (en) | Mapping database structure to software | |
US20190132327A1 (en) | Systems and methods for access to electronic data | |
US20090037829A1 (en) | Framework to integrate web services with on-premise software | |
US9356845B1 (en) | System and method for audience segment profiling and targeting | |
CN100524309C (en) | Apparatus, system, and method for accessing a database | |
CN112000692B (en) | Page query feedback method and device, computer equipment and readable storage medium | |
CN106201542B (en) | WOF rapid development platform |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20110511 |