Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp.netÁ¬½ÓSQL ºÍACCESSÊý¾Ý¿â

ASP.NETÈçºÎÁ¬½ÓAccess»òSQL ServerÊý¾Ý¿â 
Ê×ÏÈ¿´Ò»¸öÀý×Ó´úÂëƬ¶Ï:
³ÌÐò´úÂë: 
--------------------------------------------------------------------------------
using System.Data;
using System.Data.OleDb;
......
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+=@"Data Source=C:\BegASPNET\Northwind.mdb";
OleDbConnection objConnection=new OleDbConnection(strConnection);
......
objConnection.Open();
objConnection.Close();
......
 
--------------------------------------------------------------------------------
½âÊÍ:
¡¡Á¬½ÓAccessÊý¾Ý¿âÐèÒªµ¼Èë¶îÍâµÄÃüÃû¿Õ¼ä,ËùÒÔÓÐÁË×îÇ°ÃæµÄÁ½ÌõusingÃüÁî,ÕâÊDZز»¿ÉÉÙµÄ!
¡¡strConnectionÕâ¸ö±äÁ¿Àï´æ·ÅµÄÊÇÁ¬½ÓÊý¾Ý¿âËùÐèÒªµÄÁ¬½Ó×Ö·û´®,ËûÖ¸¶¨ÁËҪʹÓõÄÊý¾ÝÌṩÕߺÍҪʹÓõÄÊý¾ÝÔ´.
¡¡"Provider=Microsoft.Jet.OleDb.4.0;"ÊÇÖ¸Êý¾ÝÌṩÕß,ÕâÀïʹÓõÄÊÇMicrosoft JetÒýÇæ,Ò²¾ÍÊÇAccessÖеÄÊý¾ÝÒýÇæ,asp.net¾ÍÊÇ¿¿Õâ¸öºÍAccessµÄÊý¾Ý¿âÁ¬½ÓµÄ. 
¡¡"Data Source=C:\BegASPNET\Northwind.mdb"ÊÇÖ¸Ã÷Êý¾ÝÔ´µÄλÖÃ,ËûµÄ±ê×¼ÐÎʽÊÇ"Data Source=MyDrive:MyPath\MyFile.MDB".
ps:
¡¡1."+="ºóÃæµÄ"@"·ûºÅÊÇ·ÀÖ¹½«ºóÃæ×Ö·û´®ÖеÄ"\"½âÎöΪתÒå×Ö·û.
¡¡2.Èç¹ûÒªÁ¬½ÓµÄÊý¾Ý¿âÎļþºÍµ±Ç°ÎļþÔÚͬһ¸öĿ¼ÏÂ,»¹¿ÉÒÔʹÓÃÈçϵķ½·¨Á¬½Ó:
¡¡¡¡strConnection+="Data Source=";
¡¡¡¡strConnection+=MapPath("Northwind.mdb");
¡¡¡¡ÕâÑù¾Í¿ÉÒÔÊ¡µÃÄãдһ´ó¶Ñ¶«Î÷ÁË!
¡¡3.ҪעÒâÁ¬½Ó×Ö·û´®ÖеIJÎÊýÖ®¼äÒªÓ÷ֺÅÀ´·Ö¸ô.
¡¡"OleDbConnection objConnection=new OleDbConnection(strConnection);"ÕâÒ»¾äÊÇÀûÓö¨ÒåºÃµÄÁ¬½Ó×Ö·û´®À´½¨Á¢ÁËÒ»¸öÁ´½Ó¶ÔÏó,ÒÔºó¶ÔÊý¾Ý¿âµÄ²Ù×÷ÎÒÃǶ¼ÒªºÍÕâ¸ö¶ÔÏó´ò½»µÀ.
¡¡"objConnection.Open();"ÕâÓÃÀ´´ò¿ªÁ¬½Ó.ÖÁ´Ë,ÓëAccessÊý¾Ý¿âµÄÁ¬½ÓÍê³É.ÆäÓà²Ù×÷(²åÈë,ɾ³ý...)Çë²ÎÔÄÏà¹ØÊé¼®
 
Á¬½ÓSQL Server
Àý×Ó´úÂëƬ¶Ï:
³ÌÐò´úÂë: 
-------------------------------------------------------------------------------- 
ÍøÒ³½ÌѧÍø
using System.Data;
using System.Data.SqlClient;
...
string strConnection="user id=sa;password=;";
strConnection+="initial catalog=Northwind;Server=YourSQLServer;";
strConnection+="Connect Timeout=30";
SqlConne


Ïà¹ØÎĵµ£º

sqlÓï¾äÓÅ»¯30Àý×Ó

ÔÚSQLÓï¾äÓÅ»¯¹ý³ÌÖУ¬ÎÒÃǾ­³£»áÓõ½hint,ÏÖ×ܽáÒ»ÏÂÔÚSQLÓÅ»¯¹ý³ÌÖг£¼ûOracle HINTµÄÓ÷¨£º
1. /*+ALL_ROWS*/
±íÃ÷¶ÔÓï¾ä¿éÑ¡Ôñ»ùÓÚ¿ªÏúµÄÓÅ»¯·½·¨,²¢»ñµÃ×î¼ÑÍÌÍÂÁ¿,ʹ×ÊÔ´ÏûºÄ×îС»¯.
ÀýÈç:
SELECT /*+ALL+_ROWS*/ EMP_NO,EMP_NAM,DAT_IN from BSEMPMS WHERE EMP_NO='SCOTT';
2. /*+FIRST_ROWS*/
±íÃ÷¶ÔÓï¾ä¿éÑ ......

SQL Server 2008³É¾ÍÆóÒµÊý¾Ýƽ̨

 
 
±¾ÎĹؼü´Ê£ºSQL 2008 SQL SQL Server SQL Server 2008
¶ÔÓÚ¼´½«ÔÚ2008Äê¡ÖØ·¢²¼µÄSQL Server 2008£¬Î¢ÈíÆÚÍûÊг¡²»½ö½öÊÇ°ÑËü×÷Ϊ¹ØϵÊý¾Ý¿âϵͳÀ´¿´´ý£¬Î¢Èí½«Æ䶨λΪһ¸öÆóÒµÊý¾Ýƽ̨£¬ËäÈ»¹ØϵÊý¾Ý¿âÒýÇæÈÔÈ»ÊÇSQL Server 2008µÄºËÐÄ£¬²»¹ýSQL Server 2008ËùÄÜÌṩµÄ·þÎñ¹ã¶È½«Ô¶³¬¹ý¼òµ¥µÄ¹ØϵÊý¾ ......

SQL Server 2008³É¾ÍÆóÒµÊý¾Ýƽ̨

 
 
±¾ÎĹؼü´Ê£ºSQL 2008 SQL SQL Server SQL Server 2008
¶ÔÓÚ¼´½«ÔÚ2008Äê¡ÖØ·¢²¼µÄSQL Server 2008£¬Î¢ÈíÆÚÍûÊг¡²»½ö½öÊÇ°ÑËü×÷Ϊ¹ØϵÊý¾Ý¿âϵͳÀ´¿´´ý£¬Î¢Èí½«Æ䶨λΪһ¸öÆóÒµÊý¾Ýƽ̨£¬ËäÈ»¹ØϵÊý¾Ý¿âÒýÇæÈÔÈ»ÊÇSQL Server 2008µÄºËÐÄ£¬²»¹ýSQL Server 2008ËùÄÜÌṩµÄ·þÎñ¹ã¶È½«Ô¶³¬¹ý¼òµ¥µÄ¹ØϵÊý¾ ......

SQL Server 2008¼¸ÏîÐÂÌØÐÔ¸ÅÊö

¼Æ»®ÓÚ2008ÄêµÚÒ»¼¾¶È·¢²¼µÄSQL Server 2008²»½ö¶ÔÔ­ÓÐÐÔÄܽøÐÐÁ˸Ľø£¬»¹Ìí¼ÓÁËÐí¶àÐÂÌØÐÔ£¬±ÈÈçÐÂÌíÁËÊý¾Ý¼¯³É¹¦ÄÜ£¬¸Ä½øÁË·ÖÎö·þÎñ£¬±¨¸æ·þÎñ£¬ÒÔ¼°Office¼¯³ÉµÈµÈ¡£
¡¡¡¡SQL Server¼¯³É·þÎñ
¡¡¡¡SSIS(SQL Server¼¯³É·þÎñ)ÊÇÒ»¸öǶÈëʽӦÓóÌÐò£¬ÓÃÓÚ¿ª·¢ºÍÖ´ÐÐETL(½âѹËõ¡¢×ª»»ºÍ¼ÓÔØ)°ü¡£SSIS´úÌæÁËSQL 2000µÄDTS¡£Õ ......

SQL Server JDBC Çý¶¯·â×°

1¡¢½¨Á¢Ò»¸öjdbc.jsp Îļþ£º
2¡¢½«ÏÂÃæÏàÓ¦µÄ´úÂ븴ÖƵ½jdbc.jspÖÐ
3¡¢±àдҪÁ¬½Óµ½Êý¾Ý¿âµÄjspÎļþʱ£¬Ö»Ð轫jdbc.jspÎļþ°üº¬µ½¸ÃjspÎļþÖоÍÐÐÁË
·½·¨£ºÌí¼Ó<%@  include file="jdbc.jsp">µ½jspÎļþÖм´¿É
//sql server2005:
<%@ page language="java" import ="java.util.*"%>
 
<%
& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ