Microsoft SQL Server
This section describes how to use the Microsoft SQL Server
database interface in PowerBuilder.
Supported versions for SQL Server
You can access Microsoft SQL Server version 6.0, 6.5, 7.0
and SQL Server 2000 databases using the Microsoft SQL Server interface.
The SQL Server interface uses a DLL named PBMSS80.DLL to access
the database.
For more information about supported interfaces
for your product, see “Supported Database Interfaces” in online
Help.
Supported SQL Server datatypes
The Microsoft SQL Server database interface supports these
datatypes:
Binary | Numeric |
Bit | Real |
Character (fewer than 255 characters) |
SmallDateTime |
DateTime | SmallInt |
Decimal | SmallMoney |
Float | Text |
Identity | Timestamp |
Image | TinyInt |
Int | VarBinary |
Money | VarChar |
Datatype conversion When you retrieve or update columns, PowerBuilder converts
data appropriately between the Microsoft SQL Server datatype and
the PowerScript datatype. Keep in mind, however, that similarly
or identically named SQL Server and PowerScript datatypes do not
necessarily
have the same definitions.
For information about the definitions of PowerScript
datatypes, see the PowerScript Reference
.
Basic software components for SQL Server
You must install the following software components to access
a database with the Microsoft SQL Server interface:
Preparing to use the SQL Server database
Before you define the database interface and connect to a
Microsoft SQL Server database in PowerBuilder, follow these steps
to prepare the database for use:
- Install and configure the required
database server, network, and client software. - Install the SQL Server database interface.
- Verify that you can connect to the Microsoft SQL
Server server and database outside PowerBuilder.
Step 1: install and configure the database server
You must install and configure the database server, network,
and client software for SQL Server.
To install and configure the database server,
network, and client software:
-
Make sure the Microsoft SQL Server 6.x
or 7.x and 2000 database software is installed and running on the
server specified in your database profile.You must obtain the database server software and required
licenses from Microsoft Corporation.For installation instructions, see your Microsoft
SQL Server documentation.Upgrading from an earlier version of SQL Server For instructions on upgrading to SQL Server 7.x or 2000 from
an earlier version of SQL Server or installing it alongside an earlier
version, see your Microsoft SQL Server documentation. -
If you are accessing a remote SQL Server database,
make sure the required network software (for example, TCP/IP)
is installed and running on your computer and is properly configured
so that you can connect to the SQL Server database server at your
site.For installation and configuration instructions,
see your network or database administrator. -
Install the required Microsoft SQL Server client
software on each client computer on which PowerBuilder is installed.You must obtain the SQL Server client software from Microsoft Corporation.
Make sure the version of the client software you install supports all
of
the following:- The operating
system running on the client computer - The version of the database that you want to access
- The version of PowerBuilder that you are running
For installation instructions, see your Microsoft
SQL Server documentation. - The operating
-
Make sure the SQL Server client software is properly
configured so that you can connect to the SQL Server database server
at your site.Once you install the SQL Server client software, you can configure optional
client connection parameters by using the SQL Server Client Configuration
Utility that comes with the client software.For configuration instructions, see your Microsoft
SQL Server documentation. -
If required by your operating system, make sure
the directory containing the SQL Server client software is in your
system path. -
Make sure only one copy of each of the following
files is installed on your computer:- DBMSSOCN.DLL
- NTWDBLIB.DLL (32-bit SQL Server DLL)
Step 2: install the database interface
When prompted to do so by the PowerBuilder Setup program, select
the native SQL Server database interface.
For installation instructions, see the Installation
Guide
.
Step 3: verify the connection
Make sure you can connect to the SQL Server server and database
you want to access from outside PowerBuilder.
To verify the connection, use any Windows-based utility that
connects to the database. When connecting, be sure to specify the
same parameters you plan to use in your PowerBuilder database profile
to access the database.
Defining the SQL Server database interface
To define a connection through the Microsoft SQL Server interface,
you must create a database profile by supplying values for at least
the basic connection parameters in the Database Profile Setup –
Microsoft SQL Server dialog box. You can then select this profile
at any time to connect to your database in the development environment.
For information on how to define a database profile, see “Using database profiles”.
What to do next
For instructions on connecting to the database,
see “Connecting to a database”.