Dear all,

I am trying to create a data source definition dynamically. I have succeeded in creating the definition by using BDF_DATASOURCEDEF_CAPI.DATASOURCEDEFCREATE function but now i am stuck on attributes. Do attributes have to entered manually or is there a procedure that would do this for me?

Best regards,

Blaž

asked 11 Nov '13, 15:56

bepl's gravatar image

bepl
234
accept rate: 0%

Hi Blaz,

What is your use case for this? Depending on the use case maybe I can offer a suitable solution.

(12 Nov '13, 03:35) Yalim Gerger ♦♦

Hi Yalim,

I want to "copy" the datasources from powerbuilder. BR, Blaž

(12 Nov '13, 03:46) bepl

Hi Blaz,

You need to use BDF_DATASOURCEDEFATRIB_CAPI for the attributes. You also might need BDF_DATASOURCEDEFBINDVAR_CAPI to create bind variables.

link

answered 12 Nov '13, 07:10

Yalim%20Gerger's gravatar image

Yalim Gerger ♦♦
1.8k5
accept rate: 15%

Thanks,

BR, Blaž

(12 Nov '13, 07:22) bepl

Just a few more important notes: Use,

BDF_DBOBJECTACCESS_CAPI.dbobjectaccessCreate to create Datasources based on Datasource Definitions.

BDF_DATASOURCEDEF_GEN.datasetTableCreateOrReplace and BDF_DATASOURCEDEF_GEN.datasetPackageCreateOrReplace to generate the required DB objects.

There may be a few more API's that you need. But off the top of my head these are the API's that matter.

Most imporantly, these API's don't do any validation. They just insert data to tables. So if there are any inconsistencies in the data you are providing you might run into some issues.

(12 Nov '13, 07:28) Yalim Gerger ♦♦

Hi Hermann,

I have stopped using the API and am doing the export XMLs. I have found that much easier to understand. If you do not need to create them in run time, i would advise you to take this road.

Best regards, Blaž

link

answered 23 Jan '14, 04:51

bepl's gravatar image

bepl
234
accept rate: 0%

Hello Blaž and Yalim,

i've read your comments and tried to create datasource-definitions. I want to transfer a lot of db-views to the formspider-IDE, by using a sql-script.

When i use the mentioned statements, a test-datasource-definiton and datasources are visible in the IDE. But i am missing the column-descriptions (datasourceattributes?). So i can't change this dynamic created datasource-definiton in the IDE: when i commit my changes, an error is shown.

ORA-06512: in "PSFSDEV_PI.BDF_IDE_DATASOURCEDEFCOMMIT_II", Zeile 92 ORA-06512: in "PSFSDEV_PI.API_APPLICATION", Zeile 33 ORA-06512: in "PSFSDEV_PI.BDF_IDE_INTERFACE_PKG", Zeile 1692

I think, there is an api-function to create the missing attributes?! Please, can you explain me how?

Thanks!

Best regards, Hermann

link

answered 23 Jan '14, 04:37

Hermann's gravatar image

Hermann
154
accept rate: 0%

Hi Blaž,

thank you for your answer!

It is a good idea, using the xml-export.

You have created your "own"-XMLs (like the export-function do) and import them to the IDE?!

Best regards, Hermann

link

answered 23 Jan '14, 05:03

Hermann's gravatar image

Hermann
154
accept rate: 0%

Yes, and you can export individual elements so that the XML is not so complex. The structure can than be figured out with not problems.

Best regards, Blaž

link

answered 23 Jan '14, 05:08

bepl's gravatar image

bepl
234
accept rate: 0%

Thank you!

Best regards, Hermann

link

answered 23 Jan '14, 05:10

Hermann's gravatar image

Hermann
154
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×61
×13

Asked: 11 Nov '13, 15:56

Seen: 1,931 times

Last updated: 23 Jan '14, 05:10


© Copyright Gerger 2017