ASP.NETÁ¬½ÓSQLºÍACCESSµÄ·½·¨
SQL:
using System.Data.SqlClient;
string sql = "server=.;uid=sa;pwd=;database=tablename;";
ACCESS:
using System.Data.OleDb;
string sql = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" + HttpRuntime.AppDomainAppPath + "//App_Data//db.mdb";
HttpRuntime.AppDomainAppPath Ϊ¸ùĿ¼
Ïà¹ØÎĵµ£º
SELECT sysobjects.name,syscolumns.name
from sysobjects,syscolumns
WHERE(sysobjects.id=syscolumns.id)
select col_name(OBJECT_ID(£§staff£§),17)
select name
from syscolumns
where id=object_id(£§ÄãµÄ±íÃû£§); ......
¡¾IT168 ¼¼ÊõÎĵµ¡¿
ĬÈÏÇé¿öÏÂ,SQLServerExpressEdition 2005ºÍSQL Server 2005¿ª·¢°æ²»ÔÊÐíÔ¶³ÌÁ¬½Ó¡£
ÒªÔÊÐíÔ¶³ÌÁ¬½ÓSQL Server 2005 ,ÐèÒªÍê³ÉÒÔϲ½Ö裺
ÔÚSQLServer ʵÀýÉÏÆôÓÃÔ¶³ÌÁ¬½Ó¡£
´ò¿ª·þÎñÆ÷ SQLBrowser ·þÎñ¡£
ÅäÖ÷À»ðǽÒÔÔÊÐíSQLBrowser ·þÎñºÍSQLServer·þ ......
1.Óòéѯ·ÖÎöÆ÷ÖØÃüÃû
exec sp_rename ÔÃû³Æ, ÐÂÃû³Æ
sp_rename ÊÇ SQL Server™ ×Ô´øµÄÒ»¸ö´æ´¢¹ý³Ì£¬ÓÃÓÚ¸ü¸Äµ±Ç°Êý¾Ý¿âÖÐÓû§´´½¨µÄ¶ÔÏóµÄÃû³Æ£¬Èç±íÃû¡¢ÁÐ±í¡¢Ë÷ÒýÃûµÈ¡£
2.ÓÃÆóÒµ¹ÜÀíÆ÷ÖØÃüÃû
ÔÚ±íÉϵãÓÒ¼ü->“ËùÓÐÈÎÎñ”->“¹ÜÀí´¥·¢Æ÷”£¬Ñ¡ÖÐËùÒªÖØÃüÃûµÄ´¥·¢Æ÷£¬Ð޸Ĵ¥·¢Æ÷ ......
[php]
<?php
--------------------------------------------------------------------
//FileName:class.php
//Summary: AccessÊý¾Ý¿â²Ù×÷Àà
//Author: forest
//CreateTime: 2006-8-10
//LastModifed:
//copyright (c)2006
//http://freeweb.nyist.net/~chairy
//cha ......
ACCESSµÄ´æ´¢¹ý³Ì´´½¨ÓëÖ´ÐÐ
´´½¨£º
ÔÚAccess×ÔÉíµÄ°ïÖúÖп´µ½ÁËCreate ProcedureÓï¾ä¡£
²âÊÔÁËÀÏ°ëÌ죬ÖÕÓÚ·¢ÏÖÁ˾÷ÇÏ£º
±ØÐëʹÓÃOleDbÁ¬½Ó²ÅÄÜʹÓÃCreate ProcedureÓï¾ä¡£
ODBCÁ¬½Ó²»Ö§³Ö¸ÃÓï¾ä£¬ÌáʾCreate TableÓï·¨´íÎó¡£
´´½¨ÁË´æ´¢¹ý³Ìºó£¬Ê¹ÓÃOffice Access¹¤¾ß´ò¿ªÊý¾Ý¿â£¬ÔÚ“¶ÔÏó - ²éѯ”ÖÐÄ ......