|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
ASP是依赖组件的,能访问数据库的组件好多就有好多种,再有就是你微软的工具可是什么都要收钱的啊!程序|数据|数据库|数据库毗连上面这部分程序可说是全能的数据库毗连程序几近能够毗连一切的MS数据库。
<%
---------------------------------------------------
FunctionGetMdbConnection(FileName)
DimProvider,DBPath
Provider="Provider=Microsoft.Jet.OLEDB.4.0;"
DBPath="DataSource="&Server.MapPath(FileName)
SetGetMdbConnection=GetConnection(Provider&DBPath)
EndFunction
---------------------------------------------------
FunctionGetSecuredMdbConnection(FileName,Password)
DimProvider,DBPath
Provider="Provider=Microsoft.Jet.OLEDB.4.0;"
DBPath="DataSource="&Server.MapPath(FileName)
SetGetSecuredMdbConnection=GetConnection(Provider&DBPath&";JetOLEDB:DatabasePassword="&Password)
EndFunction
---------------------------------------------------
FunctionGetDbcConnection(FileName)
DimDriver,SourceType,DBPath
Driver="Driver={MicrosoftVisualFoxProDriver};"
SourceType="SourceType=DBC;"
DBPath="SourceDB="&Server.MapPath(FileName)
SetGetDbcConnection=GetConnection(Driver&SourceType&DBPath)
EndFunction
---------------------------------------------------
FunctionGetDbfConnection(Directory)
DimDriver,SourceType,DBPath
Driver="Driver={MicrosoftVisualFoxProDriver};"
SourceType="SourceType=DBF;"
DBPath="SourceDB="&Server.MapPath(Directory)
SetGetDbfConnection=GetConnection(Driver&SourceType&DBPath)
EndFunction
---------------------------------------------------
FunctionGetExcelConnection(FileName)
DimDriver,DBPath
Driver="Driver={MicrosoftExcelDriver(*.xls)};"
DBPath="DBQ="&Server.MapPath(FileName)
SetGetExcelConnection=GetConnection(Driver&"ReadOnly=0;"&DBPath)
EndFunction
---------------------------------------------------
FunctionGetTextConnection(Directory)
DimDriver,DBPath
Driver="Driver={MicrosoftTextDriver(*.txt;*.csv)};"
DBPath="DBQ="&Server.MapPath(Directory)
SetGetTextConnection=GetConnection(Driver&DBPath)
EndFunction
---------------------------------------------------
FunctionGetSQLServerConnection(Computer,UserID,Password,Db)
DimParams,conn
SetGetSQLServerConnection=Nothing
Params="Provider=SQLOLEDB.1"
Params=Params&";DataSource="&Computer
Params=Params&";UserID="&UserID
Params=Params&";Password="&Password
Params=Params&";InitialCatalog="&Db
Setconn=Server.CreateObject("ADODB.Connection")
conn.OpenParams
SetGetSQLServerConnection=conn
EndFunction
---------------------------------------------------
FunctionGetMdbRecordset(FileName,Source)
SetGetMdbRecordset=GetMdbRs(FileName,Source,2,"")
EndFunction
---------------------------------------------------
FunctionGetMdbStaticRecordset(FileName,Source)
SetGetMdbStaticRecordset=GetMdbRs(FileName,Source,3,"")
EndFunction
---------------------------------------------------
FunctionGetSecuredMdbRecordset(FileName,Source,Password)
SetGetSecuredMdbRecordset=GetMdbRs(FileName,Source,2,Password)
EndFunction
---------------------------------------------------
FunctionGetSecuredMdbStaticRecordset(FileName,Source,Password)
SetGetSecuredMdbStaticRecordset=GetMdbRs(FileName,Source,3,Password)
EndFunction
---------------------------------------------------
FunctionGetDbfRecordset(Directory,SQL)
SetGetDbfRecordset=GetOtherRs("Dbf",Directory,SQL,2)
EndFunction
---------------------------------------------------
FunctionGetDbfStaticRecordset(Directory,SQL)
SetGetDbfStaticRecordset=GetOtherRs("Dbf",Directory,SQL,3)
EndFunction
---------------------------------------------------
FunctionGetDbcRecordset(FileName,SQL)
SetGetDbcRecordset=GetOtherRs("Dbc",FileName,SQL,2)
EndFunction
---------------------------------------------------
FunctionGetDbcStaticRecordset(FileName,SQL)
SetGetDbcStaticRecordset=GetOtherRs("Dbc",FileName,SQL,3)
EndFunction专业性的服务。有的ASP商提供垂直型的应用服务,针对某一特定行业提供应用服务。 |
|