SE_CONNECTION Connection;
SE_STREAM Stream;
SE_ERROR Connect_error;
LONG rc;
CHAR *server, *instance, *database, *user, *passwd;
/* Connect to ArcSDE */
rc = SE_connection_create(server, instance, database, user, passwd, &Connect_error,
&Connection);
/*See Error handling section for check_error function code. */
check_error (Connection, NULL, rc, "SE_connection_create");
/* Create a stream for the query */
rc = SE_stream_create (Connection, &Stream);
/* See Error handling section for check_error function code. */
checke_error (Connection, NULL, rc, "SE_stream_create");
/* Body of application */
/* Release the stream when it is no longer needed */
rc = SE_stream_free (Stream);
/* Disconnect from ArcSDE */
SE_connection_free (Connection);