Net.Data Language Environment Reference
The Sybase language environment provides native access to your Sybase
data. You can access Sybase tables from Net.Data running in CGI,
FastCGI, NSAPI, ISAPI, or GWAPI mode.
Restrictions:
- The Sybase language environment does not support large objects, such as
images and audio. Stored procedures are supported only for procedures
without a SELECT statement.
- The Sybase language environment requires Live Connection to use
FastCGI.
To access Sybase from Net.Data
- Verify that the ENVIRONMENT statement in the Net.Data
initialization file is correct for the Sybase language environment. See
the configuration chapter in Net.Data Administration and
Programming Guide for steps and examples.
- Ensure the appropriate components of Sybase are installed and working as
follows:
- Install Sybase's Open Client on the machine where Net.Data is
installed, if it is not already installed. For more information, see
the Sybase Open Client documentation for more information.
- Verify that the Sybase ping function can be used with the same
security authorization that your Web server uses. To verify, log on
with your Web server's user ID and type:
ping sybase-instance-name
Where sybase-instance-name is the name of the Sybase system that
your Net.Data macros access.
You might not be able to verify the ping function on Windows NT
if your Web server runs under system authority. If so, skip this
step.
- Verify that the Sybase tables can be accessed with the same security
authorization that your Web server uses. To verify, enter an SQL SELECT
statement, using the ISQL line command tool, to access an Sybase table with
the authority of your Web server. For example:
SELECT * FROM tablename
You might not be able to verify table access on Windows NT if your Web
server runs under system authority. If so, skip this step.
Troubleshooting: Do not proceed if the above steps
fail. If any of the steps fail, check your Sybase configuration.
- Ensure that the Sybase environment variables are set correctly in your Web
server process.
Hint: You might require additional lines for other
Sybase environment variables, depending on the Sybase facilities you plan to
use, such as national language support and two-phase commit. Consult
the Sybase administration documentation for more information on these
environment variables.
- Test the connection to Sybase from Net.Data. In your
Net.Data macro file, specify the appropriate values in the LOGIN,
PASSWORD, and DATABASE variables. The following is an example of
connect statement in a macro file:
%DEFINE DATABASE=database-name
%DEFINE LOGIN=user_ID@remote-sybase-instance-name
%DEFINE PASSWORD=password
Live Connection: If you use Live Connection, then you can
specify the LOGIN and PASSWORD in the Live Connection configuration file,
although it is not recommend for security purposes. For example:
DATABASE=database-name
LOGIN=user_ID
PASSWORD=password
- Test your configuration by running a CGI shell script to ensure that the
Sybase instance can be accessed from your Web server, as in the following
example:
#! /bin/sh
echo "content-type; text/html
echo
echo "< html>< pre>"
set
echo "</pre>< p>< pre>"
isql -u user_ID -p password << EOFF
SELECT * FROM tablename
EOFF
echo
Troubleshooting:
If the verification step fails, check that all the preceding steps were
successful by verifying the following items:
- Check your Sybase configuration.
- Verify that the Sybase environment variable syntax is correct and that no
variables are missing.
- Check the Sybase connection, ensuring that you have entered the correct
user ID and password.
Example:
Once you have completed the accessing verification steps, you can make
calls to the Sybase language environment with functions in the macro file, as
in the following example:
%function(DTW_SYB) STL1() {
insert into $(tablename) (int1,int2) values (111,NULL)
%}
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]