Back to navigation bar    Connection

dbDSN, dbdat, dbmdb, dbTables, dbTestBlankSQL, dbCountSQL

This is the first form to be filled out in order to established data source connection. Generally, the selection sequence is -

  1. Select database type.
  2. Select ODBC or OLEDB.
  3. Select DSN or DSN-less.
  4. Fill in server, database, UID and PWD information. Skip the Server if it is a local operation.
  5. Select the Schema if the target is a view or SP.
  6. Click the DSN button. Tables and Views will show. For SPs, the StoredProc form will show. Refer to the StoredProc for more information.
  7. Pick a view/table.
  8. Pick the fields to construct the SQL statement for a table. For a view, the SQL is pre-constructed. 
  9. Click the IR button in the menu bar and the database table will display.
Database Type - Select type of Access, SQL, Oracle, Text or Excel. Even though not listed in the Designer, Paradox and Foxpro files are also supported.

Connection Type - Choose ODBC or OLEDB. There is another choice in the Option box to select MS or Oracle's ODBC driver.
This addition is due to the recent release of a functional ODBC driver from ORACLE.

DSN - Choose from this box in conjunction with the Connection Type.

Server, Database, UID, PWD - These items are termed differently according to different connection settings

dbDSN - This button build the connection string. When "Auto Connect" is checked, the connection will be made after the connection string is constructed.

When the select is "No DSN", a file dialog box will be visible for a local file selection. If the selected file has a ".dsn" extension, then FILEDSN will be used.


* Double Click in Fields will bring a field to Select Fields.
* Double Click a field in Selected Fields will delete a field.
* If Calc window is opened, Click Selected Fields will bring field sown to the Calc Box.

Type - This button will display the ADO types of the fields. Use this information for the stored procedure's data type.

Selected Flds - The "Fields listbox containing the fields of the table is a multi selected listbox. Select single or multiple fields of this listbox and then click the "Selected Flds" button will appended the selected fields to the "Selected Flds" box. These fields will then be transferred to other forms according to applicable logic. 

dbSQL - This button when clicked will build the SQL string from the "Selected Flds" listbox. All the memo fields if any will be moved to the end of the query string. A dbCountSQL property string will also be constructed. If this entry is a blank then dbSQL="*" will be generated. See dbTables & Schema for more details.

dbRecordCount - This button when clicked will count the record number of the database. If the box is filled then the dbRecordCount property will be generated and no record counting will be conducted in ASP-db. For a static database, this "trick" can be used to speed up the record counting which can be a big time saver for a large DB.

This is the SQL used to count the numer of records within the dbSQL. ASP-db will try to construct one using available data. But if user supplies one via dbCountSQL then there is no more guessing game and it'll speed up the process.

This query if supplied will be used to test whether the returned record count is 0. Note that this test will be done very entry. Only set this property upon entry and upon exit, it should branch to other modules.


Schema - This drop box is primary for MS-SQL. Table/view/SP can be selected to retrieve the appropriate names from the database schema. Check the Use Schema checkbox to see the options.

dbTables & Schema
This frame holds the schema selections to construct the dbTables property. 

Show Schema
This is a list of "table_schema" names delimited by [,]. Extarct only the Names that has the "table_schema" matching items in this this list (complete match).

Hide Name Prefix
This is list of name prefixes that if any of them matches the Name, then the nmae will not be extracted. For example to hide all the Names starting with sysXXX or dtXXX then put down sys, dt in this box (Prefix match). This option can be "borrowed" to hide prefix of any tables.

This is the size of the drop down box.

This set the search liited to the particular type.


DBQ / Data Source and Preview Data Source

DBQ / Data Source is the data source used by the Designer while Preview Data Source is used by the Preview file. Note that the Preview source can be on a different server hence inherit a different physical drive letter or a MapPath. MapPath can be used ONLY in the preview source. The MapPath button only attempts to construct the MapPath from the Designer Data Source, user is responsible for the accuracy of this data path. Note that the code generated is based on the Preview Path if it is not blank.