Tags: Successful program delete is. NET Capability Bubuko SQL _idRecently used Zblog+sql server to build a blog system, using an ASP program, because my data is very small, using plug-ins to generate HTML files, there is no need to use PHP, and I said last time, PHP blog program has some problems, very consumption of resources, And the amount of data can not be done very big, more important is static or can not resist the impact of traffic.Environment configuration: Windows Server server +zblog
When writing a java program in Linux, the problem of displaying or inserting MySQL database garbled characters is solved:
To solve this problem, you only need to add:
Amp; useUnicode = true characterEncoding = gbk
As shown below
Class. forName ("Org. gjt. mm. mysql. Driver"). NewInstance ();
String url ="Jdbc: mysql: // localhost/myDB? User = soft password = soft1234 useUnicode = true characterEncoding = gbk"
// MyD
Let's start by building a data link.
mysql_connect (' localhost ', ' root ', ' Mailangel ') or Die (' database server no exists! ');mysql_select_db (' Vot ') or Die (' Database error! ');mysql_query ("SET NAMES ' GBK '");//set document CharSet encode?>
Here's the code to read the data and pagination.
$page =isset ($_get[' page ')? $_get[' page ']:1;$sql = "SELECT * from Su_mon_vote ORDER by id DESC";$res
Label:(1) Call the Class.forName () method to load the appropriate database driver
Class.forName ("Com.mysql.jdbc.Driver");
(2) Call the Drivermanager.getconnection () method to obtain a connection object that represents an open connection
Connection conn = drivermanager.getconnection (URL, username, password);
(3) Use the Connection.createstatement () method to create a statement statement object that passes simple SQL
recently, some business modules were upgraded to support Oracle databases, which encountered some subtle problems. 1. If the provider is msdaora, the user name and password cannot be abbreviated as sqloledb. when ADO. NET is used, the user ID and password can be abbreviated to PWD as the connection string. But it may cause some subtle errors. When I changed provider to msdaora, I found that the database connection could not be opened. The exception
1. *. Processing of MDB files,Right-click "installation project" and choose "View"> "File System"Select "Web application"ProgramFolder "right-click" add "-" web folder "(add a folder for storing databases)Right-click "Web application folder" and choose "add"> "file" (add database file)
Regenerate the installation file.2. Other files required by the unfinished packaging system can also be added to the installer according to the above method.3. Package
In a stand-alone environment, you must first switch to an Oracle user to start or shut down the Oracle system, as follows
Su-oracle
Oracle databases have several startup methods:1,
Startup Nomount
Non-installation startup, this way to launch executable: Rebuild control file, rebuild databaseRead the Init.ora file, start the instance, that is, start the SGA and background processes, this startup requires only Init.ora files.
2,
Startup Mount DBName
Insta
While working with the database using normal old JDBC work, it becomes cumbersome to write unnecessary code to handle exceptions, open and close database connections, etc., but the spring JDBC framework requires all the low-level details from open connections, prepare and execute SQL statements, process exceptions, handle transactions, and finally close connections.
So all you have to do is define the conn
(1) Loading and registering the JDBC driver for the database
Load JDBC Driver:
Class.forName ("Oracle.jdbc.driver.OracleDriver");
Register JDBC Driver:
Java.sql.DriverManager.registerDriver (New Oracle.jdbc.driver.OracleDriver ());
(2) Establish a connection with the database
To establish a connection to a database, you first create a URL for the specifie
The. NET remote connection Oracle database looks pretty simple, but there are still a lot of problems. Let me share the experience of tossing this thing today.
There are many ways to access Oracle database, I use OleDbConnection, this is nothing to say, the code is as follows:
1. Connection Code
_OleDbConnection = new OleDbConnection(connectionString); _OleDbConnection.Open();
2. Connection string
The
Because of the business upgrade, the existing table in a database needs to be synchronized with the table in the previous project, deactivate the previous table, the two tables can only be synchronized by the same field, carefully studied, with the Web program processing, visual display processing progress, synchronous operation results. Relevant technical materials used:1, interface use qui (save a lot of interface development time)2, Jquery,ajax syn
Reprint http://blog.sina.com.cn/s/blog_6306496a0101j5t6.htmlHong Sing ucenter/data/config.inc.phpdiscuz! /config.inc.phpuch/config.phpEmpire cms/e/class/config.phpecshop/data/config.phpshopex/config/config.phpwordpress/wp-config.phpJoomla! /configuration.phphdwiki/config.phpPhpwind 8.0/data/sql_config.phpWeaving Dream dede/data/config.cache.inc.phpphpcms/include/config.inc.php. NET program/web.configDatabase configuration file path for several common web site
-BIN\DB-DERBY-10.5.3.0-BIN\LIB\DERBYCLIENT.JAR] 10.5.3.0– (802917)4. Create and use a databaseOpen the command line and go to the directory where you want to put the database, mine is: E:\Java\Joy \derby\derby_datathen enter IJYou'll see:IJ Version 10.5Ij>Next, you can create a database.Cases:To create a FIRSTDB database:Ij> Connect ' jdbc:derby:firstdb;create=true ';To connect the FIRSTDB database:Ij> Connect ' jdbc:derby:firstdb ';Query the
This article supporting the source code download
First, the preface
At present, many units in the system transformation and upgrading, faced with the development of various independent departments of the application of the database unified to adapt to the needs of large concentration of data, to facilitate future data mining and other high-level applications. In the process of database unification, how to
Program and resource management: PS, top, free, SAR, kill, uname①ps Syntax:[Root @test/root]# ps-auxParameter description:A: Select all the programs listedU: All users ' programs are listedx: All TTY programs are listedDescription: This is used to query the current host environment, in the background to execute the relevant program! I usually use the "Ps-aux" par
Sometimes you install programs on your computer, but you don't want these programs to appear in the Add or Remove Programs list in Control Panel, so how do you do that? Today, small knitting to introduce the solution.
Do not allow programs to display methods in Add or Remove Progr
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.