Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 8 Jahren, 3 Monaten
Letzter Beitrag:
vor 8 Jahren, 3 Monaten
Beteiligte Autoren:
DarrenF, cardcoder

[WD12] WD app updating remote MySQL database...

Startbeitrag von DarrenF am 10.05.2010 09:23

Hi guys,

I have a requirement for my WD12 app to update a remote MySQL database via the internet - is anyone doing this?

My WD app uses HF classic at the moment and I've no plans to change that yet, but need to be able to keep a remote MySQL product file in line with the local HF product file.

The local HF db structure differs from the remote MySQL structure - can I use replication for this?

Thanks in advance...

Antworten:

Darren,

We are doing this for both remote web sites and head office databases.

We don't use replication. We write to the tables of the DB. This cuts out any issues regarding table field additions etc. You can either use Hadd() if you have taken the analysis from the remote table or use sql commands using the variables you want to update as part of the sql string.

Make sure that port 3306 is forwarded to the server with the db.

Just my "2 penneth", but any other help reqd. - just shout.

Mike Allison



von cardcoder - am 10.05.2010 10:13
Hi Mike,

You knew this was coming didn't you...? ;)

...but yes, I a total newbie in this area and there's a lot I need to know... all the basic stuff to begin with.

As I said, my app is HF calssic and the remote app is totally unrelated to my app, so I need to define the table in my analysis, but:

1) How do I connect to the remote db... with a H command?

2) As I'll have read the local record using a "HReadSeek" on a HF database, how do I then tell WD that the Hadd, Hmodify or HDelete of the remote record will be a MySQL database? :confused:

3) Are there any examples in WD or on the net I could use to familiarise myself before I get deeper into the nitty-gritty?

Thanks in advance (as always)... :spos:

von DarrenF - am 10.05.2010 10:42
Hi Darren,

Read HF into a table
change connection to web
open web
hadd / hmodify etc web
close web


example of connection to web -

HDescribeConnection(ServerConnName,USERID,PWD,SERVERIP,SERVERDB,hNativeAccessMySQL,hOReadWrite)

e.g.
HDescribeConnection(onwebDB,root,password,195.1.1.5,WEBDB,hNativeAccessMySQL,hOReadWrite)

Hope this helps.

Mike

von cardcoder - am 10.05.2010 11:03
Thanks Mike,

I think that should be enough for me to "knock together" a quick test window :spos:

Cheers...

von DarrenF - am 10.05.2010 11:47
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.