VPME with Postgres

The place for peer-to-peer support for developing client-server applications with VPME 9.1.

VPME with Postgres

Postby rg400005 » Sun Jun 07, 2015 3:51 pm

Hi,
I want to use Postgres for my VPME Project.
Q1: does anybody have a working config for the databuilder remote view setup ?
Q2: what is the correct mapping for a vfp binary to a postgres binary ? I have defined the field as a binary, but then the vfp Checkbox doesnt work. I dont think it will .t. .f. on Postgress. Maybe I have to build a IIF in every Checkbox.
Is there a better way to do this ?

Thx
Rainer
rg400005
 
Posts: 72
Joined: Fri May 04, 2012 6:52 am

Re: VPME with Postgres

Postby stecenko » Sun Jun 07, 2015 5:07 pm

Are you starting from scratch or converting an existing project?

I have changed my 9.1.12 VPM classes to use Ms SQL and they seem to work with My SQL. And I have migrated most of the meta data DBFs to SQL. I still use DBFs for the data dictionary; changing the data manager to use SQL rather than DBFs seemed like too much work.

I use MS SQL Logical or Small int field type and they both work well with a checkboxes.

Dates on the other hand are a bit of a nuisance. In MS SQL they are are datetime. What I do is create my remote views then in the sDataDDF change the field type from T to D. that Means that I'm using just the date portion in VFP of the datetime.

I don't know how different postgres is from MS SQL and My SQL. It can't be that difficult, after all it's still 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: VPME with Postgres

Postby rg400005 » Mon Jun 08, 2015 3:44 am

Hello Richard,
thx for the fast response.
What I want to do is, moving only my data to a server database. This database has also other jobs to do ( save test results from a continuous integration server).

So the fat client will be still there, because we are working on the same network.

Will copy the SQL record from the DD and adapt it to postgres.

Yes, you are right, just another sql... somehow...

Best regards
Rainer
rg400005
 
Posts: 72
Joined: Fri May 04, 2012 6:52 am

Re: VPME with Postgres

Postby stecenko » Mon Jun 08, 2015 9:06 pm

i have a form that will create a sql script to create sql tables and then populate the sql tables from the dbfs.

if you want it, email me at stecenko@interact.mb.ca

there's a lot of junk in it, but you it's a start.
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: VPME with Postgres

Postby rg400005 » Wed Jun 10, 2015 7:46 am

Hello Richard,
thx for your kind offer.

Sometimes is good to rethink and act different.
Here is my solution, which saves me for setting up and maintaining a server structure.
As I don't have many concurrent users, and the most of them do only read only queries, this solution fits best for me.
1. Keep the foxpro DBFS. This also save to install client connectors ( odbc) on every ws or to rewrite my fat client app.

2. Put them on a network space and share it.
3. Deploy the app local with runtime but keep reports, data, etc. (office templates) remote on the share
4. VFP can do UNC-Path, but for avoiding nameservers I have a machine with a fixed ip address.
5. Setup DBFDir and SearchDir in Appdata to //FixedIP-Adress/Datapath of share.

4 hrs thinking, 15 min for realizing. But this saves me a lot of work and infrastructure.
But for sure, this is a doesn't fit for all solution, and with concurrent read and write a real db server will make live much easier, but you have to keep in mind, to install a client connector for every workstation or write a web app or us a terminal server solution...

BR
Rainer

Update 06/11/15
Now I have also a solution which saves me of producing web pages and even have a push notification and connection to my groupware tool.

- RSS Feed
Write some XML and put into into a webserver script.
Instead of pushing the complete table
there is a info and a item part.
(see rss doku)
In the item part (which is one record) I have link to a remote method of my webpage which then produces the info on the fly as a html page, which now can be saved stored or whatever.
example ( replace the x in column 1 with <
[list]
x?xml version="1.0" encoding="utf-8" ?>
- xrss version="2.0">
- xchannel>
xtitle>sample title</title>
xlink />
xdescription>sample description</description>
xlastBuildDate>date of last update of the dbf</lastBuildDate>
- xitem>
xtitle>sample title for the user / I build a string of some fields here in on line</title>
xdescription>description some show it or not </description>
xlink>the link to my server to call the webpage with params which does the query and returns the data</link>
xpubDate>last update of this record</pubDate>
x/item>
x/channel>
x/rss>
[/list]
Publish the link to the file, my groupware tool has a rss plugin, you can also use it with a newsreader, office,...
rg400005
 
Posts: 72
Joined: Fri May 04, 2012 6:52 am


Return to VPM Enterprise 9.1 - Client Server

Who is online

Users browsing this forum: No registered users and 1 guest

cron