How do you moderanize VPME applications?

The place to discuss and announce issues that don't relate directly to ProMatrix, but that are of interest to ProMatrix users. Feel free to use the Chatter forum as you like (as long as your use is in good taste).

How do you moderanize VPME applications?

Postby Abbas » Fri Aug 19, 2016 8:00 am

Hi guys
I am thinking to start a new project in VPME. I have few questions:

(1) How do you modernize your VPME applications? I mean anybody extended VPME to incorporate VFPx themed controls or used activeX controls etc.

(2) How do you automatically resize the forms according to screen resolution?

(3) Is there an intelligent way to downsize sqlserver db to vfp?

(4) Is there an automatic way to create remote/local views or cursors required by VPME?

(5) I have come across CABuilder utility, which creates cursors for all the tables in sqlserver db. Anybody created utility like this to create VPME compatible cursors?

(6) Are there any fieldname and tablenames limits in vfp? I need long field and table names.

Thanks
Abbas
Abbas
 
Posts: 26
Joined: Sun Jul 25, 2010 11:41 am

Re: How do you moderanize VPME applications?

Postby stecenko » Sat Aug 20, 2016 10:37 am

1) I've used several ActiveX controls: xfrx, dbi, textControl, and some imaging controls.

2) I don't know.

As for the rest, if your data is in SQL, then it is easily accessible by VPME. If you use 9.1.12, you can create remote views on the existing tables in SQL.

Do you have some compelling reason to downsize?

How many tables are there?
Richard Stecenko
Interactive Computer Services Inc.
Victoria, British Columbia
204.453.2052
stecenko
 
Posts: 822
Joined: Mon Jun 21, 2010 8:06 pm
Location: Saanich, British Columbia

Re: How do you moderanize VPME applications?

Postby Abbas » Sat Aug 20, 2016 11:31 am

stecenko wrote:1)If your data is in SQL, then it is easily accessible by VPME. If you use 9.1.12, you can create remote views on the existing tables in SQL.

Do you have some compelling reason to downsize?

How many tables are there?


I have database in sqlserver with around 300 tables. I have VPME 9.1.12 and you are right, I can create remote views directly. I have developed a couple of small applications in VPME6 but never developed in VPME 9+.

I have another important question:

In one-to-many forms. VPME forces me to save the parent record before I add the records in child grid. I don't want to do this. I want to save parent and children in the same go. Is it possible or is there any workaround to achieve this?
This is my big concern.
Thanks.
Abbas
 
Posts: 26
Joined: Sun Jul 25, 2010 11:41 am

Re: How do you moderanize VPME applications?

Postby stecenko » Sun Aug 21, 2016 11:54 am

I assume that you are using SQL and that you set up referential integrity in SQL and you are using a sequential primary key in SQL.

If that's the case, then you have a problem. VPME writes the children before writing the parent. But SQL doesn't know the PK of the parent because it hasn't been written yet and SQL throws an error.

My solution to that is to use guids for the primary keys, generate them in VPME, and turn off referential integrity in SQL on the children.

I don't know if you will be happy with that answer.

If that won't work for you, you could try this is the save method of the form...

local dlnSelect, returnValue
store select() to dlnSelect
store thisform.oVpmdatahander.saverecord('alias of parent') to returnValue
select(dlnSelect)
if returnValue=0
store thisform.save() to returnValue
endif
return returnValue

you should check the technical reference manual to see if you will need other parameters for the saveRecord
Richard Stecenko
Interactive Computer Services Inc.
Victoria, British Columbia
204.453.2052
stecenko
 
Posts: 822
Joined: Mon Jun 21, 2010 8:06 pm
Location: Saanich, British Columbia

Re: How do you moderanize VPME applications?

Postby stecenko » Sun Aug 21, 2016 12:00 pm

I re-read your question and maybe all you need to do is set the property lSaveNewParentOnNewChild to .t.

Click on the property and see the Property Description for an explanation.
Richard Stecenko
Interactive Computer Services Inc.
Victoria, British Columbia
204.453.2052
stecenko
 
Posts: 822
Joined: Mon Jun 21, 2010 8:06 pm
Location: Saanich, British Columbia

Re: How do you moderanize VPME applications?

Postby Abbas » Mon Aug 22, 2016 9:33 am

Setting lSaveNewParentOnNewChild to .T. saves the parent record automatically. But this is not what I want.

I need to save the parent and child records in one transaction.
Thanks for your response.
Abbas
 
Posts: 26
Joined: Sun Jul 25, 2010 11:41 am

Re: How do you moderanize VPME applications?

Postby stecenko » Mon Aug 22, 2016 11:44 am

Can you use SqlExec and text/endtext to do your own save?
Richard Stecenko
Interactive Computer Services Inc.
Victoria, British Columbia
204.453.2052
stecenko
 
Posts: 822
Joined: Mon Jun 21, 2010 8:06 pm
Location: Saanich, British Columbia

Re: How do you moderanize VPME applications?

Postby Abbas » Mon Aug 22, 2016 2:42 pm

Hi Richard
I will figure out this one-to-many problem later. Right now I am struggling with cursoradapters. I have Cursoradapter Questions in Client/Server forum. Please look into it if you can help me with cursoradapters.
Thanks
Abbas
 
Posts: 26
Joined: Sun Jul 25, 2010 11:41 am

Re: How do you moderanize VPME applications?

Postby stecenko » Tue Aug 23, 2016 9:43 am

Sorry, I've never used Cursor Adapters. I've only used Remote Views with SQL.
Richard Stecenko
Interactive Computer Services Inc.
Victoria, British Columbia
204.453.2052
stecenko
 
Posts: 822
Joined: Mon Jun 21, 2010 8:06 pm
Location: Saanich, British Columbia

Re: How do you moderanize VPME applications?

Postby Abbas » Tue Aug 23, 2016 10:38 am

stecenko wrote:Sorry, I've never used Cursor Adapters. I've only used Remote Views with SQL.


I myself am of the view that cursoradapters only solution is not possible with VPME. Candidate Keys and Primary Key duplication check requires VIEWS. Can't specify cursoradapters for duplication check.

I am limiting myself to remote views.

Thanks.
Abbas
 
Posts: 26
Joined: Sun Jul 25, 2010 11:41 am

Next

Return to Chatter

Who is online

Users browsing this forum: No registered users and 2 guests

cron