|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
只要你想学,就没什么优缺点,上面那位大哥已经把网上的评论说了,但我认为想学哪个都一样,不然它就不可能在当今时代数字艺术方面存活到今天ado|毗连数据库|字符串ADO毗连数据库字符串年夜全
ThispagecontainssampleADOconnectionstringsforODBCDSN/DSN-Less,
OLEDBProviders,RemoteDataServices(RDS),MSRemote,MSDataShape.
AlsoincludedareADO.NETconnectionstringsforeach.NETManagedProvider
(SQLClient,OLEDB,andODBC).
Thesesampleconnectionstringsarecompiled
byCarlProthman,aMicrosoftVisualBasicMVP
Enjoy!
TableofContents
ODBCDSNConnectionsDSN
FileDSN
ODBCDSN-LessConnections ODBCDriverforAS/400
ODBCDriverforAccess
ODBCDriverfordBASE
ODBCDriverforExcel
ODBCDriverforMySQL
ODBCDriverforOracle
ODBCDriverforParadox
ODBCDriverforSQLServer
ODBCDriverforSybase
ODBCDriverforSybaseSQLAnywhere
ODBCDriverforText
ODBCDriverforTeradata
ODBCDriverforVisualFoxPro
OLEDBDataLinkConnectionsDataLinkFile(UDL)
OLEDBDataProviderConnections OLEDBProviderforAS/400
OLEDBProviderforActiveDirectoryService
OLEDBProviderforDB2
OLDDBProviderforInternetPublishing
OLEDBProviderforIndexServer
OLEDBProviderforMicrosoftJet
OLEDBProviderforODBCDatabases
OLEDBProviderforOracle(FromMicrosoft)
OLEDBProviderforOracle(FromOracle)
OLEDBProviderforSimpleProvider
OLEDBProviderforSQLServer
RemoteDataService(RDS)ConnectionsRDSDataControl-ConnectProperty
RDSDataControl-URLProperty
ADOURLConnectionsADORecordset
MSRemoteProviderConnectionsMSRemote-Access(Jet)
MSRemote-SQLServer
DataShapeProviderConnections MSDataShape-SQLServer
.NETManagedProviderConnectionsSQLClient.NETManagedProvider(System.Data.SqlClient)
OLEDB.NETManagedProvider(System.Data.OleDb)
ODBC.NETManagedProvider(System.Data.ODBC)
ODBCDSNConnections
UsinganODBCDSN(DataSourceName)isatwostepprocess.
1)YoumustfirstcreatetheDSNviathe"ODBCDataSourceAdministrator"program
foundinyourcomputersControlPanel(orAdministrativeToolsmenuinWindows2000).
MakesuretocreateaSYSTEMDSN(notaUSERDSN)whenusingASP.
Note:YoucanalsocreatetheDSNviaVBcode.
2)Thenusethefollowingconnectionstring-withyourownDSNnameofcourse. ;-)
ODBC-DSN
oConn.Open"DSN=AdvWorks;"&_
"Uid=Admin;"&_
"Pwd=;
YoucanalsocreateanduseaFileDSN.ThenusethefollowingADOConnectionstring:
ODBC-FileDSN
oConn.Open"FILEDSN=c:somepathmydb.dsn;"&_
"Uid=Admin;"&_
"Pwd=;"
Formoreinformation,see:AboutODBCdatasourcesand
HowtoUseFileDSNsandDSN-lessConnections
Note:TheproblemwithDSNisthatUserscan(andwill)modifythem(ordeletebymistake),
thenyourprogramwontworksowell...SoitsbettertouseaDSN-LessorOLEDBProvider
connectionstringwithaTrustedConnectionifpossible!
ODBCDSN-LessConnections
ODBCDriverforAS/400
oConn.Open"Driver={ClientAccessODBCDriver(32-bit)};"&_
"System=myAS400;"&_
"Uid=myUsername;"&_
"Pwd=myPassword;"
Formoreinformation,see: AFastPathtoAS/400Client/Server
ODBCDriverforAccess
ForStandardSecurity:
oConn.Open"Driver={MicrosoftAccessDriver(*.mdb)};"&_
"Dbq=c:somepathmydb.mdb;"&_
"Uid=Admin;"&_
"Pwd=;"
IfyouareusingaWorkgroup(Systemdatabase):
oConn.Open"Driver={MicrosoftAccessDriver(*.mdb)};"&_
"Dbq=c:somepathmydb.mdb;"&_
"SystemDB=c:somepathmydb.mdw;",_
"admin",""
IfMDBislocatedonanetworkshare:
oConn.Open"Driver={MicrosoftAccessDriver(*.mdb)};"&_
"Dbq=myServermySharemyPathmyDb.mdb;"
Formoreinform</p>asp,jsp,php是web开发的三大技术,asp简单易用且有microsoft做靠山,jsp功能强大是因为有java支持,php则开源跨平台.在国内,asp应用范围最广,jsp发展势头最猛,php则处于劣势.这可能与公司的支持以及技术的培训有关. |
|