Maintaining the SQL.INI File [ HP PC API User's Guide for ALLBASE/SQL and IMAGE/SQL ] MPE/iX 5.0 Documentation
HP PC API User's Guide for ALLBASE/SQL and IMAGE/SQL
Maintaining the SQL.INI File
When you install PC API, the installed copy of the SQL.INI file contains
a router section delimited by the section [ALLBASE]. You store the
connection information for all available DBEnvironments and valid
ALLBASE/SQL users under the [ALLBASE] section.
Following is a sample of the [ALLBASE] section in a SQL.INI file:
[ALLBASE]
mpedbname=server1,hp3000:data.pub.myacct,ip
mpedbname=server2,hp3000:mfg.pub.prod,ip
mpedbname=demo,demopc,source:ps.ps.p,ip
mpeuser=user3,pcuser3,who.myacct/?
mpeuser=user2,pcuser2,who.myacct/?
mpeuser=user1,pcuser1,who.myacct/?
mpeuser=sysadm,user1/userpass.acct/acctpass
Using Other Routers
You should have only one copy of the SQL.INI file on each PC client, even
if you are using other routers besides the ALLBASE Router. The SQL.INI
file can describe several routers, any of which may be active at a given
time. The [winclient.dll] section of the SQL.INI file identifies routers
to various databases. In the following example, the first two routers,
ALLBASE/SQL and Gupta SQLBase, are active:
[winclient.dll]
comdll=sqlawin
comdll=sqldbw
;comdll=sqlowin
;comdll=sqlnbiow
The last two lines are commented out and can be deleted.
Additional sections can be appended to the SQL.INI file as you install
additional routers. For example, SQLBase has connection string
information under a [sqldemo] section.
ALLBASE Connection String Syntax
NOTE After changing the SQL.INI file, you need to restart PC API if it
is currently running. To do this, click once on the HP DB Router
icon and select Close from the menu. This will close all
connections to the database server.
The complete syntax for the SQL.INI [ALLBASE] entry is as follows:
mpedbname=DBCode,Node:DBEName[,[NetType][,ConFlag]]
mpeuser=UserCode,LogonString
where
mpedbname is the keyword that maps DBCode to Node and
DBEName. Each DBEnvironment you wish to connect to
must be defined by the mpedbname.
DBCode is the database code passed by the application
software to PC API. This name must be unique within
the SQL.INI file. It can be up to eight bytes
long. The database code used by the Views Script
is server1. When you install PC API, use server1.
Node is the node name of the database server. This is a
character string containing up to 8 characters.
DBEName is the name of the DBEnvironment containing one or
more databases. The syntax for the fully qualified
DBEName is:
DBEName[.Group[.Account]]
Unless you specify a group and account name,
ALLBASE/SQL assumes the name is relative to the
group and account specified in the logon. Refer to
the "Logical Design" chapter of the ALLBASE/SQL
Database Administration Guide for more information
about the DBEnvironment.
NetType specifies the networking software residing on the
PC that is to be used to communicate with the
server. Typically, you specify NetType only when
you have more than one type of supported data
communications software loaded on the client.
NetType has the following optional values:
lw directs PC API to use Novell LAN WorkPlace
provided by Novell.
nw directs PC API to use NetWare. If you
specify nw, NetWare/iX must be running on the
database server. The server node number and
net number need to be specified:
nw [ServerNodeNumber][NetNumber]
ws directs PC API to use the "Windows Sockets"
interface. This interface is for network
programming under Microsoft Windows.
sk directs PC API to use HP Sockets.
ip directs PC API to use NetIPC (HP Network
Services) Enter the NetType in lower case.
The default order that PC API uses to search
for data communications software is shown in
the above list.
For example, suppose you have both NetWare
and NetIPC loaded on your PC client. Using
the default search order, PC API always
attempts to use NetWare to communicate with
the database server. In order to direct PC
API to use NetIPC rather than NetWare, you
need to override this default by specifying a
NetType of ip.
ConFlag turns conversion on.
an converts the ROMAN8 character set to the ANSI
character set on the PC client and then
converts the data to ROMAN8 when returned to
the database server.
r8 is the default. There is no conversion.
For more information, refer to the section
"Using the ANSI Character Set" later in this
chapter.
mpeuser is the entry name that maps the UserCode to the
logon string for the user.
UserCode is the user code passed by the application software
to PC API. This name must be unique in the SQL.INI
file. The user code name used by Views Script is
sysadm. When you install PC API, use sysadm.
LogonString is the MPE/iX logon. The syntax for LogonString
is:
[SessionId],User[/UserPass].Account[/AcctPass][,Group[/GrpPass]]
SessionId is the name that identifies
the current MPE/iX session.
Although optional, it is
recommended that you use
SessionId to enable unique
tracking of each session on
the MPE/iX system.
User is the MPE/iX user creating
the system catalog views (to
be owned by SYSSQL) in the
final step of the
installation.
UserPass is the optional user
password. You can use a ?
as a placeholder. The ?
placeholder causes a dialog
box to appear on the screen
when the logon string is
validated. The user then
enters the password into the
dialog box.
Account is the MPE/iX user account.
AcctPass is the optional account
password. You can use a ?
as a placeholder. The ?
placeholder causes a dialog
box to appear on the screen
when the logon string is
validated. The user then
enters the password into the
dialog box.
Group is the optional group name
associated with the account
name.
GrpPass is the optional group
password. You can use a ?
as a placeholder. The ?
placeholder causes a dialog
box to appear on the screen
when the logon string is
validated. The user then
enters the password into the
dialog box.
Refer to the manual Using the
900 Series HP 3000:
Fundamental Skills for a
complete explanation of the
logon string, and the account
structure.
__________________________________________________
NOTE To specify a connection string for the HP
9000, refer to the HP PC API User's Guide for
ALLBASE/SQL and IMAGE/SQL.
__________________________________________________
An example of a connection string is shown at the beginning of this
section.
Adding a New DBEnvironment Name
To add a new DBEnvironment name, add an mpedbname entry to the SQL.INI
file under the [ALLBASE] section, as described in the "ALLBASE Connection
String Syntax" section in this chapter. Each DBEnvironment needs a set
of SYSSQL views. To add the SYSSQL views, use the Views Script.
Adding a New User Logon
To add a new user logon, add an mpeuser entry to the SQL.INI file under
the [ALLBASE] section in the SQL.INI file.
Using the ANSI Character Set
The HP 3000 uses the default ROMAN8 character set. Most applications
running under Microsoft Windows use the 8-bit ANSI (ISO 8859/1) character
set to provide support for Western European languages (including
American). The first 127 characters are the same for both ROMAN8 and
ANSI character sets, so only the extended and special characters are
different.
If your PC client application uses these extended or special characters,
then the data from the database server must be converted from ROMAN8 to
ANSI, and the data returning to the database server must be converted
from ANSI to ROMAN8. To activate the conversion, use the ConFlag
parameter in the ALLBASE connection string syntax described earlier in
this chapter. The conversion takes place on the PC client.
Bind variables of datatype CHAR and VARCHAR are also converted. A bind
variable in an SQL statement is associated (bound) to variables defined
in a program. A bind variable is another name for a dynamic parameter.
For more information, refer to the ALLBASE/SQL Reference Manual.
A few characters cannot be converted to ROMAN8 and then back to ANSI. For
example, when the copyright sign in ANSI is converted to ROMAN8, it is
changed to a lowercase "c." When the data is returned to the PC client,
the copyright sign cannot be recognized, as it was converted to a "c."
The following characters, sent from the PC client, cannot be properly
converted from ANSI to ROMAN8 in a round-trip fashion. (The hex
designation is listed along with the character name.)
* A6 broken bar
* A9 copyright sign
* AC not sign
* AE registered trade mark
* B2 superscript 2
* B3 superscript 3
* B8 cedilla
* B9 superscript 1
* D7 multiply sign
* F7 divide sign
Similarly, the following characters, sent from the database server,
cannot be properly converted from ROMAN8 to ANSI in a round-trip fashion.
* A9 accent grave
* AA circumflex accent
* AC tilde accent
* BE Dutch guilder
* EB uppercase S caron
* EC lowercase s caron
* EE uppercase Y umlaut
* F6 long dash
* FC solid box
Improving Performance
You may not need all the information contained in the SQL.INI file. You
can reduce the file to include only the following sections:
* dbrouter
* dbwindow
* sqlrtrw
* winclient.dll
* dbdfault
* winservr
* ALLBASE
MPE/iX 5.0 Documentation