Login Tips
General
You do not have to provide information in every field to connect to a
database. For most database engines you should be able to login by providing
Provider, DSN, UID and Password.
Database/Service Specific Tips
The following specific tips do not list all possible login methods, but
should provide you with a few login options:
Oracle
To login to an Oracle database:
1) Select "MS Oracle" or "Oracle OLEDB" from the Provider
list, and provide UID, Password and Server, or
2) select "Generic ODBC" from the Provider list, and provide DSN,
UID and password.
Your login method will affect the functionality available in QueryODBC.
Microsoft Access
To login to a Microsoft Access database, select "MS Access"
from the Provider list, select (None) from the DSN list, and provide UID,
password and full path and file name in the database field. As of the writing of
this help file, you cannot use a DSN to login to an Access database since the
Access ODBC driver does not currently support asynchronous query execution. If
the ODBC driver is updated by Microsoft to support this, you will be able to
login using a DSN other than (None).
Microsoft SQL Server
To login to a Microsoft SQL Server database, select "MS SQL
Server" from the Provider list. You can use a DSN to login, or login
without using a DSN. To login using a DSN, provide DSN, UID and password.
However, currently the MS SQL Server provider does not recognize the
"Change the default database to" setting specified in the Microsoft
SQL Server DSN configuration dialog. If you use this login method, you will be
logged into the default database specified for the UID in MS SQL Server's
Enterprise Manager. To login without using a DSN, select (None) from the DSN
list, and provide UID, password and database name (i.e. "Northwind")
in the database field (you can also optionally select a driver and enter a
server name).
Microsoft Indexing Service
To login to the Microsoft Indexing Service, select "MS Indexing
Service" from the Provider list, and enter the desired catalog name in the
database field.
Microsoft Active Directory Service
To login to the Microsoft Active Directory Service, select "MS
Active Directory Service" from the Provider list, and enter your user ID
and password in the database field. Since the Microsoft Active Directory
Service does not support transactions, you must set your Auto Commit option to
"After each query" in order to connect to this service (see command
tab options window for details).
Other
Create your own login file and use the Use File button to
login to any OLEDB compatible service or provider. The login file is a text file
that must contain a complete OLEDB connection string.
Command Line Parameters
You can launch QueryODBC using command line parameters to
connect to a database and execute a query. The connection parameter
is "/c" and must be followed by a space then a valid OLE DB connection
string surrounded by double quotes (you can use a login file to generate and
obtain the OLE DB connection string - see Save in Buttons below
for information on generating login files). The query parameter is
"/q" and must be followed by a valid query surrounded by double
quotes. The command line can be passed to Windows using either the Windows
Start/Run dialog, or a batch (.BAT) file.
The following example command line will launch QueryODBC,
connect to a database and execute a query (you can also connect without
executing a query by dropping the "/q" parameter):
QueryODBC.exe /c "Provider=SQLOLEDB;UID=sa;PWD=myPass;Database=DemoDb;"
/q "select * from mytable"
Fields
Provider
Select the database provider you wish to use to connect to
the database. Most of the providers are installed when you install MDAC.
However, Microsoft stopped including the "MS Access" provider in the
MDAC install starting with MDAC version 2.6. The "MS Access" provider
is installed when you install Access. The "Oracle OLEDB" provider is
supplied by Oracle Corporation and is not included in MDAC. To use the
"Oracle OLEDB" provider you must download and install it from Oracle's
web site @ http://otn.oracle.com/software/content.html.
Tip: You should ONLY use the "Generic ODBC" provider if your desired provider is not listed. Choosing the generic ODBC provider may limit functionality in
QueryODBC.
DSN
Select the user Data Source Name (DSN) you wish to use to connect to the database. DSN's
are created in the ODBC administrator. See help for the ODBC administrator for more
information.
UID
Enter the User ID (UID) for the selected DSN. UID's are created and maintained using the
database provider's tools. See help for the database provider's tools for more
information.
Password
Enter the password for the current UID. Passwords are created and maintained using the
database provider's tools. See help for the database provider's tools for more
information.
Database
Enter the path and file name of the database to which you wish to connect.
Driver
Enter the name of the ODBC driver you wish to use to connect to the database.
Server
Enter the name of the database server to which you wish to connect.
Buttons
Login
Login to the database using the current settings.
Save
Save the current connection values to a login file. Use the use file button
to login using a login file.
Use File
Login using a login file. Use the save button to create a login file.
Cancel
Close the login window without logging in to the database.
Help
Displays this topic.
Menu / Toolbar
Process/Connect
Display the login window. Selecting this menu option causes the previous database connection to be closed.
|