Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7545043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:49:40+00:00 2026-05-30T08:49:40+00:00

I have some legacy Pro*C code using the kind of constructs below. This kind

  • 0

I have some legacy Pro*C code using the kind of constructs below.
This kind of pattern is found on online forums but nothing in the Oracle documentation.
In particular, Google can’t find any doc about “sqhsts” on the Oracle website.

Is this pattern documented somewhere?
Is it considered a good programming practice?

/* cud (compilation unit data) array */
static const short sqlcud0[] =
{10,4130,832,0,0,
5,0,0,1,0,0,27,23,0,0,4,4,0,1,0,1,97,0,0,1,97,0,0,1,97,0,0,1,10,0,0,
36,0,0,2,30,0,4,25,0,0,1,0,0,1,0,2,97,0,0,
};

/* EXEC SQL CONNECT :user IDENTIFIED BY :pwd USING :url; */ 

{
struct sqlexd sqlstm;
sqlstm.sqlvsn = 10;
sqlstm.arrsiz = 4;
sqlstm.sqladtp = &sqladt;
sqlstm.sqltdsp = &sqltds;
sqlstm.iters = (unsigned int )10;
sqlstm.offset = (unsigned int )5;
sqlstm.cud = sqlcud0;
sqlstm.sqlest = (unsigned char *)&sqlca;
sqlstm.sqlety = (unsigned short)256;
sqlstm.occurs = (unsigned int )0;
sqlstm.sqhstv[0] = ( void *)user;
sqlstm.sqhstl[0] = (unsigned int )0;
sqlstm.sqhsts[0] = ( int )0;
sqlstm.sqindv[0] = ( void *)0;
sqlstm.sqinds[0] = ( int )0;
sqlstm.sqharm[0] = (unsigned int )0;
sqlstm.sqadto[0] = (unsigned short )0;
sqlstm.sqtdso[0] = (unsigned short )0;
sqlstm.sqhstv[1] = ( void *)pwd;
sqlstm.sqhstl[1] = (unsigned int )0;
sqlstm.sqhsts[1] = ( int )0;
sqlstm.sqindv[1] = ( void *)0;
sqlstm.sqinds[1] = ( int )0;
sqlstm.sqharm[1] = (unsigned int )0;
sqlstm.sqadto[1] = (unsigned short )0;
sqlstm.sqtdso[1] = (unsigned short )0;
sqlstm.sqhstv[2] = ( void *)url;

(code copied from here but similar to mine)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T08:49:41+00:00Added an answer on May 30, 2026 at 8:49 am

    Pro*C creates low level C from statements like

    EXEC SQL BEGIN DECLARE SECTION;
    EXEC SQL END DECLARE SECTION;
    

    Which creates OCI-like descriptors of each data item you declare. Other statements (EXEC SQL ...;) where you embed sql with those bound variables are then translated to a lower level series of calls using what was encoded in the declare section. Pro*C is old. I worked on the first beta of Pro*C 25+ years ago. …not recommended.

    The code generated by Pro*C pre-compilation does not always do perfectly when compiled by modern compilers with warnings enabled. It also is not meant to be readable. If you want to learn OCI programming, you can get what is going on. Not really recommended, either, unless you want to do some special tasks.

    Example task: OCI is used to create external C/C++ libraries for Oracle. It pretty much lets you work with almost anything you would want to do in oracle, at a fine grain level. Start here:

    http://www.oracle.com/technetwork/database/features/oci/index.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some legacy code that contains this typedef: typedef enum simple_op_enum { #define
I have some legacy classic ASP code (not ASP.Net, but ASP), and I want
I have some legacy code that I'm rewriting using SubSonic to help the future
Very strange question but I have some legacy code that interacts with another application
I have some legacy code that looks like this: void* getData(DataType dataType) { switch(dataType)
I have some legacy code to reuse written in c++ with opengl but most
I have some legacy python code that using pypar and mpich2 to transmit data
I have some 'legacy' code (which I can't change, but need to add on
I'm cleaning up some legacy code and I have found methods which explicitly throw
I have some legacy code I'm going through, and i just found a join

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.