Access to the NPC database via the ODBC interface

Source: Internet
Author: User
Tags odbc odbc connection



?? Domestic software and domestic chip of the dilemma, on the one hand, the market already exists superior performance of similar software, the cost is very low, but the small crowd of domestic software not only need to buy high-priced copyright, and software development and maintenance costs; On the other hand, domestic software is generally difficult to use, performance is not stable, the bug flying, although can go to But no one is willing to wait patiently for domestic software iterations, or even market ecology does not give domestic software iteration opportunities, selective neglect of domestic, domestic companies will not give engineers the opportunity to try the wrong, which directly limits the ability of Chinese software to improve.
?? Although domestic software is at a disadvantage, but in the area involved in the safety of GJ, the word localization is a fragrant bobo, in a strong position, especially after the ZTE event, localization will slowly advance. We are supporting localization, but hope that the localization of software can be active innovation, do not live in ZF and TZ asylum, never long, Pianan corner, go to the market to compete.
?? Domestic database has reached the dream database, the National People's Bank database, this article mainly on how the database on the Windows 7/10 operating system with the C # programming language through the ODBC interface access to support localization.


Introduction to the database of the People's Congress


?? Beijing People's Congress Information Technology Co., Ltd. (abbreviated: NPC Kanakura) is China's independent research and development database products and data management solutions leader, from Renmin University and a group of first in the domestic database teaching, research and development experts in 1999 launched the establishment, To date, China Electronics Technology Group  under the Pu Hua Foundation Software Co., Ltd. and Tai Chi Computer Co., Ltd. Strategic Capital Injection, was incorporated into the  group's overall development strategy.
?? Kingbasees is a database product for transaction-oriented, simple analytical applications that can host the business of various industry management information systems and business production systems, and can be used to replace Oracle's large, general-purpose relational database. (Website introduction, look just fine, understand how)
?? Because the people's Congress need to buy copyright, now on the network is circulating an ancient version of Kingbase ES V3.1, self-contained activation code, this article takes this database as an example, tells the database development process.


Introduction to ODBC


?? The People's Bank database provides an interface based on open database Connectivity, ODBC, and ODBC provides a unified interface for heterogeneous database access, allowing applications to use SQL as a data access standard to access data managed by different DBMS Enables the application to manipulate data directly in DB without changing with DB.


Software configuration


?? When installing Kingbase ES V3.1, be sure to follow the steps to install, this version is older, otherwise easy to follow the failure, presumably summed up as:


    • After opening the Setup folder, run Setup and enter the serial number, as shown in the following installation:
    • After the installation is complete, before running, open the database initialization tool in the Start menu to initialize
    • Run the interactive query tool, where the user name is system and the password is the manager
    • If you are prompted to fail to start the connection server, to see if database service Manager is started, failure to start cannot run the interactive query tool as shown in:

      ?? In summary, the database is installed successfully and the table is built, as shown in, where Public.memberdb is the table that this article builds according to the needs of the demo, storing the user information.

      Create ODBC

      ?? After the installation is successful, view? C:\Windows\SysWOW64\kodbc.dll is present, this is the driver Library for Kingbase and ODBC connections.
      ?? Because the database software is 32-bit, in the management tool of the Control Panel, open the ODBC data source (32-bit), click Add in the User DSN to see if there is a kingbase ODBC driver, if it does not exist, you can run: C:\Windows\SysWOW64\ Odbcad32.exe, the steps are the same as above.

      ?? The specific steps for ODBC creation can refer to the ODBC Connection database data source for C # programming. After the ODBC is created successfully, you can click Test Connection, which will prompt the connection to succeed, as shown in.

      C # Development

      ?? This paper provides a class for adding and deleting Kingbase via ODBC interface, which is normal in Win7/win 10 test. source Code and database download
      ?? In the sample program that runs this article, notice that you first build the table and implement an ODBC connection, and then modify the string that connects the database, Constr = "Driver={kingbase ODBC Driver}; Server=w; Uid=system; Pwd=manager;database=test; ";
      ?? In addition, the kingbased Interactive query tool, right-click on the table has "scripted to the Window", you can produce SQL statements of database operations, facilitate the development of the database. such as "select" ID "," "NAME", "PASSWORD", "Man", "level", "Addtime" from "public". Memberdb ";"


Access to the NPC database via the ODBC interface


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.