1. Roland Smith
  2. PowerBuilder
  3. Saturday, 11 May 2024 05:30 AM UTC

I am trying to figure out how to access data from a datastore in a C++ PBNI extension. I'm passing a ResultSet object to the PBNI extension.

This is the entire code example for the GetItemData method:

d_rsAccessor->GetItemData(1, 1, &sd);

It doesn't show how to declare sd. 

I have the GetColumnMetaData method working so I have the column number, name, datatype, and width.

Any help would be appreciated.

Brad Mettee Accepted Answer Pending Moderation
  1. Saturday, 11 May 2024 16:20 PM UTC
  2. PowerBuilder
  3. # 1

From the looks of the declaration of the function in the PBNI docs, you declare sd like this:
IPB_RSItemData sd;

and call it
d_rsAccessor->GetItemData(1, 1, &sd)

OR declare it like this:

IPB_RSItemData *sd;
use alloc (or one of it's friends) to assign memory to it:
sd = alloc(sizeof(sd));

and call it like this
d_rsAccessor->GetItemData(1, 1, sd)

 

Hope this helps

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.