NCBI C++ ToolKit
Functions | Variables
rpc.c File Reference
#include "common.h"
#include <common/test_assert.h>
+ Include dependency graph for rpc.c:

Go to the source code of this file.

Go to the SVN repository for this file.


static void init_proc (const char *name)
static void Test (const char *name)
int main (int argc, char *argv[])


static const char procedure_sql []

Function Documentation

◆ init_proc()

static void init_proc ( const char *  name)

Definition at line 34 of file rpc.c.

References CHKExecDirect, cmd, procedure_sql, SQL_NTS, and T.

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 

Definition at line 207 of file rpc.c.

References init_proc(), odbc_command, odbc_connect(), odbc_disconnect(), ODBC_FREE, strcat, and Test().

◆ Test()

static void Test ( const char *  name)

Variable Documentation

◆ procedure_sql

const char procedure_sql[]
Initial value:
" @null_input varchar(30) OUTPUT \n"
", @first_type varchar(30) OUTPUT \n"
", @nullout int OUTPUT\n"
", @nrows int OUTPUT \n"
", @c varchar(20)\n"
"AS \n"
"BEGIN \n"
"select @null_input = max(convert(varchar(30), name)) from systypes \n"
"select @first_type = min(convert(varchar(30), name)) from systypes \n"
"select name from sysobjects where 0=1\n"
"select distinct convert(varchar(30), name) as 'type' from systypes \n"
"where name in ('int', 'char', 'text') \n"
"select @nrows = @@rowcount \n"
"select distinct convert(varchar(30), name) as name from systypes \n"
"return 42 \n"
"END \n"

Definition at line 10 of file rpc.c.

Referenced by init_proc().

Modified on Fri Mar 01 10:07:17 2024 by rev. 669887