Microsoft SQL Server – PB Docs 90

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 PBMSS90.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 the datatypes
listed in Table 5-2.

Table 5-2: Supported datatypes for Microsoft SQL Server
Binary Numeric
Bit Real
Character (fewer
than 255 characters)
SmallDateTime
DateTime SmallInt
Decimal SmallMoney
Float Text
Identity Timestamp
Image TinyInt
Int VarBinary
Money VarChar

note.gif 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 software components in Figure 5-3 to access a database with
the Microsoft SQL Server interface.

Figure 5-3: Components of a Microsoft
SQL Server connection


cnw5mss.gif

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:

  1. Install and configure the required
    database server, network, and client software.
  2. Install the SQL Server database interface.
  3. 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.

proc.gif To install and configure the database server,
network, and client software:

  1. Make sure the Microsoft SQL Server 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.

    note.gif Upgrading from an earlier version of SQL Server For instructions on upgrading to a later version of SQL Server
    or installing it alongside an earlier version, see your Microsoft
    SQL Server documentation.

  2. 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.

  3. 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.

  4. 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.

  5. If required by your operating system, make sure
    the directory containing the SQL Server client software is in your
    system path.

  6. 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

In the PowerBuilder Setup program, select the Typical install,
or select the Custom install and select the native SQL Server database
interface.

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”.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x