ProBindingSource - Import Schema From File

Posted by Jeff Ledbetter on 10-May-2010 17:16

Hi.

I am trying to import a dataset from an include file into a ProBindingSource. However, unless the include file physically exists in my project, it does not work. Nothing is displayed in the subsequent "Available schema items" dialog. Since the dialog for selecting a PDS include file is the system dialog (and not an Eclipse project file selection dialog), I would expect this to work.

I've checked my PROPATH and everything appears to be in order.

Has anyone else encountered this behavior?

Jeff

All Replies

Posted by Thomas Mercer-Hursh on 10-May-2010 17:36

Did you try pasting the contents of the include file directly into the program to see if it made any difference?

Posted by Jeff Ledbetter on 10-May-2010 18:07

I am not sure that I smell what your're cooking here. Paste the TT and DS defintions into the .cls file?

Posted by Thomas Mercer-Hursh on 10-May-2010 18:19

It just seemed that you were point a figure at these definitions being in an include file and that the file itself was not in the project.  My first reaction would be to get rid of those special conditions and see if that had anything to do with the problem.  I.e., try it pasted in directly.  If that works, try it in an include file in the project.  Etc. But, if it doesn't work directly pasted in, then you know that the use of include and the location of the file is not the issue.

Posted by Jeff Ledbetter on 11-May-2010 09:15

The dialog that displays "available schema" only displays available schema when the include file(s) for the dataset and temp-tables exist in the project. I am going to assume that this is a bug. In the meantime, I was hoping thta someone else had figured out some kind of work-around.

Posted by Wouter Dupré on 11-May-2010 09:18

Hi, I'm out of the office on for business. During my absence I will have no or limited access to my e-mail.

For immediate assistance please call our office at +32 (0) 15 30 77 00.

Best regards,

Wouter.

--

Wouter Dupré

Senior Solution Consultant

Progress Software NV

Stocletlaan 202 B| B-2570 Duffel | Belgium

Direct Line +32 (0) 15 30 77 00 | Mobile +32 (0) 478 50 00 49

wdupre@progress.com

Posted by Admin on 11-May-2010 13:13

The dialog that displays "available schema" only displays when the include file(s) exist in the project. I am going to assume that this is a bug.

Jeff, I guess it's a feature, not a bug.

The dialog is able to import the schema from an include file that contains temp-table definitions using a LIKE database table (yeah, we all know...). A project is probably required to offer a database reference to evaluate the fields from a LIKE table. A project is a container for database connections.

A workaround? Add it to a project

Posted by Jeff Ledbetter on 11-May-2010 13:23

Hi.

These temp-tables do not have a LIKE reference in them.

From what I understand, the ProBindingSource should be able to parse the PDS and create the necessary schema. I don't think a db connection would/should be needed for that.

Posted by Admin on 11-May-2010 13:33

These temp-tables do not have a LIKE reference in them.

 

But I guess it's a generic requirement of the dialog because it's able to read LIKE definitions as well. A LIKE definition would only be useful with a DB.

To give you a workaround, please explain why it's a problem to add the .i file to a project - so that we can understand.

Posted by Jeff Ledbetter on 11-May-2010 13:43

It's not a "problem" to add the include file to the project. However, if that is not supposed to be a restriction then I would rather not have to resort to a work-around. The ProBindingSource brings up the system get file dialog (not the Eclipse project resource selection dialog), so I can only infer that I should be able to select any include file from the sysytem and not simply a project resource.

I will log as a bug. I thought maybe there was some preference somewhere that I had not checked.

Posted by Admin on 11-May-2010 13:58

The ProBindingSource brings up the system get file dialog (not the Eclipse project resource selection dialog), so I can only infer that I should be able to select any include file from the sysytem and not simply a project resource.

 

Well the Visual Designer is merging 3 technologies: Java, ABL and .NET

Each time passing from one technologie to another adds extra development effort. So my guess is, that it was simply easier to implement a Windows System Dialog from a .NET Dialog (belonging to a .NET Component).

But I do understand that it's kind of confusing (I'm glad that we implemented our own dialogs here).

Posted by Admin on 15-May-2010 17:39

Hi,

I also ha ve similiar problem with import schema. i tried to import from a include file a simple data set, but i get the following error:

"Data at the root level is invalid.Line 1, position 1. "

The file i try to include from is dsCustomer.i and it contains just:

define

temp-table ttCustomer

     field name as character.

define

dataset dsCustom for ttCustomer.

Can anybody tell me what i'm doing wrong ?

Posted by Admin on 16-May-2010 01:48

"Data at the root level is invalid.Line 1, position 1. "

Sounds like a different issue than what Jeff reported.

 

You're include file is getting accepted from the location where it's stored but the content is not understood. I'd report that (including the include file) to tech support.

Another thing you might try first is to reformat the contents of your file: Try removing the line breaks in the DEFINE TEMP-TABLE ttCustomer and DEFINE DATASET dsCustom FOR ttCustomer statements.

This thread is closed