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

asp 11ÖÐÁ¬½ÓÊý¾Ý¿âµÄ·½·¨

¡¡ASPÁ¬½ÓÊý¾Ý¿âµÄ11ÖÖ·½·¨——±¾ÎÄ×ܽáÁËʹÓÃASPÁ´½Ó¸÷ÖÖÊý¾Ý¿âµÄ·½·¨£º
¡¡¡¡1.AccessÊý¾Ý¿âµÄDSN-lessÁ¬½Ó·½·¨:
set adocon=Server.Createobject("adodb.connection")
adoconn.Open"Driver={Microsoft Access Driver(*.mdb)};DBQ="& _
Server.MapPath("Êý¾Ý¿âËùÔÚ·¾¶")
¡¡¡¡2.Access OLE DBÁ¬½Ó·½·¨£º
set adocon=Server.Createobject("adodb.connection")
adocon.open"Provider=Microsoft.Jet.OLEDB.4.0;"& _
"Data Source=" & Server.MapPath("Êý¾Ý¿âËùÔÚ·¾¶")
¡¡¡¡3.SQL serverÁ¬½Ó·½·¨£º
set adocon=server.createobject("adodb.recordset")
adocon.Open"Driver={SQL Server};Server=(Local);UID=***;PWD=***;"& _
"database=Êý¾Ý¿âÃû;"
¡¡¡¡4.SQL server OLE DBÁ¬½Ó·½·¨:
set adocon=Server.Createobject("adodb.connection")
adocon.open"provider=SQLOLEDB.1;Data Source=RITANT4;"& _
"user ID=***;Password=***;"& _
"inital Catalog=Êý¾Ý¿âÃû"
¡¡¡¡5.Oracle Á¬½Ó·½·¨:
set adocon=Server.Createobject("adodb.connection")
adocon.open"Driver={microsoft odbc for oracle};server=oraclesever.world;uid=admin;pwd=pass;"
¡¡¡¡6.Oracle OLE DB Á¬½Ó·½·¨:
set adocon=Server.Createobject("adodb.connection")
adocon.open"Provider=OraOLEDB.Oracle;data source=dbname;user id=admin;password=pass;"
¡¡¡¡7.dBase Á¬½Ó·½·¨:
set adocon=Server.Createobject("adodb.connection")
adocon.open"Driver={microsoft dbase driver(*.dbf)};driverid=277;dbq=------------;"
¡¡¡¡8.mySQL Á¬½Ó·½·¨:
set adocon=Server.Createobject("adodb.connection")
adocon.open"Driver={mysql};database=yourdatabase;
uid=username;pwd=yourpassword;option=16386;"
¡¡¡¡9.Visual Foxpro Á¬½Ó·½·¨:
set adocon=Server.Createobject("adodb.connection")
adocon.open"Driver={microsoft Visual Foxpro driver};sourcetype=DBC;sourceDB=*.dbc;Exclusive=No;"
¡¡¡¡10.MS text Á¬½Ó·½·¨:
set adocon=Server.Createobject("adodb.connection")
adocon.open"Driver={microsoft text driver(*.txt; *.csv)};dbq=-----;"&_
"extensions=asc,csv,tab,txt;Persist SecurityInfo=false;"
¡¡¡¡11.MS text OLE DB Á¬½Ó·½·¨:
set adocon=Server.Createobject("adodb.connection")
a


Ïà¹ØÎĵµ£º

asp»º´æÇåÀíÓï¾ä˵Ã÷£º

<%
Response.Buffer = True
'Ò»°ãÇé¿öÏ£¬µ±Óû§ÇëÇóWEB·þÎñÆ÷ʱ£¬·þÎñÆ÷°ÑÇëÇó»Ø¸´¸ø¿Í»§¶Ë¡£ÔÚ¿Í»§¶Ë£¬ä¯ÀÀÆ÷°Ñ»º´æ×÷ΪһÖÖ¼Ó¿ìËٶȵIJßÂÔ£¬¾ÍÊǵ±ÇëÇóʱÏȼì²é»º´æµÄÇé¿ö£¬Èç¹ûÓоÍÖ±½Óµ÷»º´æÁË£¬¶ø²»ÇëÇó·þÎñÆ÷ÁË¡£
'ÔÚWEB³ÌÐòÉè¼ÆÖУ¬ÓÐʱΪÁË·ÀÖ¹Öظ´µÄÌá½»»òÕßÑϸñµÄ´ÎÐòµÈ£¬±ØÐëÈÃÓû§µÄÊý¾ÝÁ¢¼´ÔÚʹÓúó¾Í ......

aspÐÔÄܲâÊÔ±¨¸æ

ÔÚ·þÎñÆ÷ÉÏÉú³É¶¯Ì¬ÄÚÈÝÊÇʹÓÃASP×îÖ÷ÒªµÄÔ­ÒòÖ®Ò»£¬ËùÒÔÎÒÃÇÑ¡ÔñµÄµÚÒ»¸ö²âÊÔÏîÄ¿ÊÇÈ·¶¨°Ñ¶¯Ì¬ÄÚÈÝ·¢Ë͵½Ó¦´ðÁ÷ʹÓÃʲô·½·¨×îºÃ¡£»ù±¾µÄÑ¡ÔñÓÐÁ½ÖÖ£¨ÒÔ¼°ËüÃǵÄһЩ±ä»¯£©£ºÊ¹ÓÃÄÚǶASP±ê¼Ç£¬Ê¹ÓÃResponse.WriteÓï¾ä¡£
¡¡¡¡ Ϊ²âÊÔÕâЩ²»Í¬µÄ·½·¨£¬ÎÒÃÇ´´½¨ÁËÒ»¸ö¼òµ¥µÄASPÒ³Ã棬ҳÃæÏȶ¨ÒåһЩ±äÁ¿È»ºó°ÑËüÃDzåÈëµ½±í¸ ......

¹ØÓÚaspÖеÄÊý¾Ý¿âÁ¬½ÓÎÊÌâ

ÎÒдÁËÒ»¸ö±íµ¥¾ÍÊÇÓÃÀ´ÏòÊý¾Ý¿âÖÐÌí¼ÓÊý¾ÝµÄ action=post.asp method=post
È»ºóÔÙpost.aspµ±ÖÐÎÒÓÖͨ¹ýrequest.form»ñÈ¡ÁËÏàÓ¦µÄÖµ£¬È»ºóÌí¼ÓµÄÊý¾Ý¿âµ±ÖÐ
ËùÓеĴúÂëÈçÏÂ
------------------------------------conn.asp-----------------------------
<%
dim db
const databasetype="access"
db="data\meiyijix ......

asp¶ÁÈ¡Îı¾ÄÚÈÝ

'**************************************************    
'º¯ÊýÃû£ºFSOFileRead    
'×÷ ÓãºÊ¹ÓÃFSO¶ÁÈ¡ÎļþÄÚÈݵĺ¯Êý    
'²Î Êý£ºfilename ----ÎļþÃû³Æ    
'·µ»ØÖµ£ºÎļþÄÚÈÝ    
'************** ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ