asp Á¬½Ó mysql ´úÂë
Á¬½Ó´úÂë1Ö±½ÓÊäÈë
<%
Dim my_conn, sql,rs
Set my_conn = createobject("ADODB.Connection")
my_conn.open = "DRIVER={MySQL ODBC 3.51 Driver};"_
& "SERVER=localhost;"_ '·þÎñÆ÷Ãû
& "DATABASE=mybase;"_ 'Êý¾Ý¿âÃû
& "UID=root;PWD=111; OPTION=35;" 'Óû§ÃûºÍÃÜÂë
Set rs = Server.CreateObject("ADODB.Recordset")
%>
Á¬½Ó´úÂë2Óõ½ÁËÊý¾ÝÔ´
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
conn.Open "DSN=mybase" ' Êý¾ÝÔ´Ãû
ÏÂÃæÊǹرպÍÊý¾Ý¿âµÄÁ¬½Ó
my_conn.close ' Close database connection
Set my_conn = nothing 'obj variable released
Ïà¹ØÎĵµ£º
Ò³Ãæ×Ô¶¯Ë¢Ð´úÂë´óÈ«£¬»ù±¾ÉÏËùÓÐÒªÇó×Ô¶¯Ë¢ÐÂÒ³ÃæµÄ´úÂ붼ÓУ¬´ó¼Ò¿ÉÒÔ×ÔÓÉ·¢»Ó×ö³öÍêÃÀµÄÒ³Ãæ¡£
1)
10±íʾ¼ä¸ô10ÃëË¢ÐÂÒ»´Î
2)
<script>
window.location.reload(true);
</script>
Èç¹ûÊÇÄãҪˢÐÂijһ¸öiframe¾Í°Ñwindow¸ø»»³ÉframeµÄÃû×Ö»òIDºÅ
3)
<script>
window.navigate("±¾Ò³Ãæurl"); ......
integer »òÕß int
int »òÕß java.lang.Integer
INTEGER
4 ×Ö½Ú
long
long Long
BIGINT
8 ×Ö½Ú
short
short Short
SMALLINT
2 ×Ö½Ú
byte
byte Byte
TINYINT
1 ×Ö½Ú
float
float Float
FLOAT
4 ×Ö½Ú
double
double Double
DOUBLE
8 ×Ö½Ú
b ......
¡¡ÍøÉÏÓкܶàµÄÎÄÕ½ÌÔõôÅäÖÃMySQL·þÎñÆ÷£¬µ«¿¼Âǵ½·þÎñÆ÷Ó²¼þÅäÖõIJ»Í¬£¬¾ßÌåÓ¦ÓõIJî±ð£¬ÄÇЩÎÄÕµÄ×ö·¨Ö»ÄÜ×÷Ϊ³õ²½ÉèÖòο¼£¬ÎÒÃÇÐèÒª¸ù¾Ý×Ô¼ºµÄÇé¿ö½øÐÐÅäÖÃÓÅ»¯£¬ºÃµÄ×ö·¨ÊÇMySQL·þÎñÆ÷Îȶ¨ÔËÐÐÁËÒ»¶Îʱ¼äºóÔËÐУ¬¸ù¾Ý·þÎñÆ÷µÄ”״̬”½øÐÐÓÅ»¯¡£
mysql> show global status;
¡¡¡¡¿ÉÒÔÁгöMySQL·þÎ ......
ÔÚ֮ǰµÄÎÄÕÂÀÎÒÒѾÌá¹ýÈçºÎ½â¾öJSPÖÐÂÒÂëÎÊÌ⣨½â¾ötomcatÏÂÖÐÎÄÂÒÂëÎÊÌâ £©£¬ÆäÖÐÒ²Ïêϸ½â˵ÁËMYSQLÂÒÂëÎÊÌ⣬ÏàÐÅͨ¹ýÀïÃæµÄ°ì·¨£¬¿Ï¶¨¶¼ÒѾ½â¾öÁËJSPÀïµÄÂÒÂëÎÊÌ⣬²»¹ý»¹ÊÇÓÐЩÈ˵ÄMYSQLÂÒÂëÎÊÌâûÓеõ½½â¾ö£¬°üÀ¨ÎÒ×Ô¼º£¬ËùÒÔÓÖÕÒÁËһЩ×ÊÁÏ£¬Ï£ÍûÕâ´ÎÄÜÍêÈ«½â¾öMYSQLÊý¾Ý¿âµÄÂÒÂëÎÊÌâ¡£
......