Ultradev instance tutorial: 2.4 UltraDev connection code with various databases
Author:Eve Cole
Update Time:2009-05-30 18:35:02
Chapter 2: Setting up the database
Section 4: Connection code between UltraDev and various databases
When we use Ultradev, we can choose to use a variety of databases, such as our commonly used access database, sql database, mysql, etc. When Ultradev connects to various databases, the database connection codes required are different. On your own computer, you can use DSN, custom connection characters; on the database server, you can use DSN, custom connection characters, or Server.Mappath; friends are easily confused when they first learn. In this series of teaching materials, I list some here for reference.
-------------------------------------------------- -------------
ODBCDSNLess connection
(No DSN connection required)
MS Access ODBC DSNless connection
Driver={Microsoft Access Driver (*.mdb)};Dbq=c:somepathdbname.mdb;Uid=Admin;Pwd=pass;
dBase ODBC DSNless connection
Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=c:somepathdbname.dbf;
Oracle ODBC DSNless connection
Driver={Microsoft ODBC for Oracle};Server=OracleServer.world;Uid=admin;Pwd=pass;
MS SQL Server DSNless connection
Driver={SQL Server};Server=servername;Database=dbname;Uid=sa;Pwd=pass;
MS Text Driver DSNless connection
Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=c:somepath;Extensions=asc,csv,tab,txt;Persist Security Info=False;
Visual Foxpro DSNless connection
Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;SourceDB=c:somepathdbname.dbc;Exclusive=No;
MySQL DSNless connection
driver={mysql}; database=yourdatabase;uid=username;pwd=password;option=16386;
The above just lists some commonly used ADO connection codes for databases used when using asp. However, please note that in the custom connection code dialog box, each connection code can only be one line and cannot be added to a new line, otherwise it will not be recognized. If there are line breaks, you'll have to connect them yourself.