[ Previous ] [ Contents ] [ Index ] [ Next ]

Ns_DbExec

Overview

Execute an SQL command

Syntax

    int Ns_DbExec (
    	Ns_DbHandle				*handle,
    	char				*sql
    );

Description

The Ns_DbExec function executes the specified SQL command on the specified database connection. Ns_DbExec returns one of the following status codes:
NS_ERROR if the SQL command fails
NS_DML if the SQL command is DML (Data Manipulation Language) or DDL (Data Definition Language)
NS_ROWS if the SQL command will return rows (such as a SELECT command)

This function allows you to write a true ad hoc query tool and process SQL statements without knowing ahead of time if they return rows or are DDL or DML statements.

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1996 America Online, Inc.