PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil â†’ WINDEV Mobile 2024 â†’ [WM20] Acces another Analysis
[WM20] Acces another Analysis
Débuté par ARV, 27 mar. 2018 22:43 - 19 réponses
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 27 mars 2018 - 22:43
Hi everyone

Like the title said I want to create a project to access another project Analysis that I create, is it that possible?

thanks
best regards.
Posté le 28 mars 2018 - 13:12
Hi Jose,

it depends what you means by 'accessing' and what you want to do with
it, but with the very little information you are giving us, I would say
yes...

If you want to know what's possible, look here:
http://doc.windev.com/…

I can think of hchangeconnection and hopenanalysis as first steps for
your answer, but again, with so few details, I cannot be sure

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on http://www.fabriceharari.com


Le 3/27/2018 à 2:43 PM, Jose a écrit :
Hi everyone

Like the title said I want to create a project to access another project
Analysis that I create, is it that possible?

thanks
best regards.
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 28 mars 2018 - 22:21
Hi Fabrice

with more details it's something like this:

I have an app called A and app Called B those two are my creation.

on app A I have some issues with my tables on that Analysis so I want to use an app B to access on that Analysis and make some changes without using HmodifyStructure.

Tell me if you want more details.


PD: I will take a look on the URL you give me thanks!

best regards my fellow developer.
Message modifié, 28 mars 2018 - 22:23
Posté le 29 mars 2018 - 14:15
You want to make changes in the ANALYSIS? Or do you want to make changes
in the DATA?

Because NO, you should never change the analysis from code, it has to be
done from the analysis editor, or you are going to completely break the
system.

Le 3/28/2018 à 2:21 PM, Jose a écrit :
Hi Fabrice

with more details it's something like this:

I have an app called A and app Called B those two are my creation.

on app A I have some issues with my tables on that Analysis so I want to
use an app B to access on that Analysis and make some changes without
using HmodifyStructure.

Tell me if you want more details.


PD: I will take a look on the URL you give me thanks!

best regards my fellow developer.
Path: news.pcsoft.fr!not-for-mail
From: "Jose" <priv!24v8+0EI0C-82028BA4FZ6@08-+2B@M0r95+2p51s6@news.pcsoft>
Newsgroups: pcsoft.us.windevmobile
Message-ID: <2018638c066a9b872c512627738c759ae368@news.pcsoft.fr>
Date: Wed, 28 Mar 2018 20:21:57 +0200
Subject: Re: [WM20] Acces another Analysis
NNTP-Posting-Host: 190.140.45.194
X-Server-Date: Wed, 28 Mar 2018 20:21:57 +0200
Xref: news.pcsoft.fr pcsoft.us.windevmobile:2065
References: <201850fe6163051261c579cd2fe1b48159d6@news.pcsoft.fr>
: bytes: 430
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
X-Authenticated-User: Y
X-Complaints-To: <info@psoft.fr>
X-No-Archive: Yes
Approved: <moderateur@pcsoft.fr>

Hi Fabrice

with more details it's something like this:

I have an app called A and app Called B those two are my creation.

on app A I have some issues with my tables on that Analysis so I want to
use an app B to access on that Analysis and make some changes without
using HmodifyStructure.

Tell me if you want more details.


PD: I will take a look on the URL you give me thanks!

best regards my fellow developer.
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 29 mars 2018 - 15:14
Hi Fabrice

Well the thing I want to do it's:

1) if it possible modify the tables like adding a new colum on my table on DB
2) modify the Data of one or more tables on my DB

those two are possible or just one?

thanks Fabrice
best regards.
Posté le 29 mars 2018 - 16:09
Hi Jose,


Le 3/29/2018 à 7:14 AM, Jose a écrit :
Hi Fabrice

Well the thing I want to do it's:

1) if it possible modify the tables like adding a new colum on my table
on DB


It IS possible with an ALTER table query, however, it is a VERY BAD
idea, as the analysis will not match with the data structure anymore,
and therefore you will break everything... THis possibility exist for
the cases where you DON'T USE an analysis...

Mixing the two techniques is baaad

> 2) modify the Data of one or more tables on my DB

This is no problem, as long as you know the data structure. There are
several ways to do that (hchangeconnexion, hopenanalysis,
hdeclareexternal, etc)...

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on http://www.fabriceharari.com


those two are possible or just one?

thanks Fabrice
best regards.
Posté le 29 mars 2018 - 16:11
Another thing,

I suddenly saw in the subject that you are asking for windev MOBILE...

ANY of this will be possible ONLY if your files from APP A are in a
place that APP B can access (ie not the DEFAULT place)

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on http://www.fabriceharari.com


Le 3/29/2018 à 7:14 AM, Jose a écrit :
Hi Fabrice

Well the thing I want to do it's:

1) if it possible modify the tables like adding a new colum on my table
on DB
2) modify the Data of one or more tables on my DB

those two are possible or just one?

thanks Fabrice
best regards.
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 02 avril 2018 - 16:20
Hi Fabrice

When you say about not the default place, Do you mean this?






Best regards.
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 02 avril 2018 - 16:25
Hi Fabrice

Also I remember on APP A I don't have connections for my classic HFSQL, maybe this is a really important clue.

So if I don't have any connection for my classic HFSQL so then they are on a default option on my Analysis.

thanks
Best Regards.
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 02 avril 2018 - 19:54
Hi Fabrice

I was trying to create my .fics on another directory but I can't get it to work, I tried to put it myself where I think it will be the "C:/" for android but it doesn't work at all.

also here's the options I get on the analysis when I create a connection for HFSQL Classic






Do you have any ideas?

Best Regards my fellow developer.
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 02 avril 2018 - 20:06
Hi

I think it's because all of the devices the "C:/" it's different for everyone so it's hard to get it, maybe if I create the analysis on code I could get what I want.

best regards.
Posté le 02 avril 2018 - 22:21
Hi Jose

you seem to be trying a lot of things without ever looking in the help
for the information you need.

All the directories thingy is explained clealry in it. Just look at the
'android' pages, where all the specificties of developping for android
are described.

best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on http://www.fabriceharari.com


Le 4/2/2018 à 12:06 PM, Jose a écrit :
Hi

I think it's because all of the devices the "C:/" it's different for
everyone so it's hard to get it, maybe if I create the analysis on code
I could get what I want.

best regards.
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 03 avril 2018 - 00:01
Hi everyone

Now I get how to change the path of the tables for HFSQL Classic it's something like this:

First you need to create your analysis like normal and add a connection it doesn't matter if it's on the application directory just add one.

Second you need to put this code on the project code in the event called "Initializing" <Name project>
HDescribeConnection("ConnectionClassic","","",SysDirStorageCard(),"",hAccessHF7)
HOpenConnection("ConnectionClassic")
HChangeConnection("*","ConnectionClassic")


Like this you will create all of your tables of the analysis on the "C:/" for android, with this code just copy and paste it on another project and you will access to the same table and data files.

The bad thing is that with this I can change my futures project but It doesn't help me with the real problem I have right now


My project is on the default one so...
theres a way to access or even copy those files and change the things I want to? and then re-direct those tables on that files for a better manage?


thanks
best regards my fellows developers.
Posté le 03 avril 2018 - 13:51
Hi Jose

nope

DON'T describre a connection in the analysis.
Just describe your files as classic

in the project init code do a hChangeDir

You are done

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on http://www.fabriceharari.com


Le 4/2/2018 à 4:01 PM, Jose a écrit :
Hi everyone

Now I get how to change the path of the tables for HFSQL Classic it's
something like this:

First you need to create your analysis like normal and add a connection
it doesn't matter if it's on the application directory just add one.

Second you need to put this code on the project code in the event called
"Initializing" <Name project>
HDescribeConnection("ConnectionClassic","","",SysDirStorageCard(),"",hAccessHF7)

HOpenConnection("ConnectionClassic")
HChangeConnection("*","ConnectionClassic")


Like this you will create all of your tables of the analysis on the
"C:/" for android, with this code just copy and paste it on another
project and you will access to the same table and data files.

The bad thing is that with this I can change my futures project but It
doesn't help me with the real problem I have right now


My project is on the default one so...
theres a way to access or even copy those files and change the things I
want to? and then re-direct those tables on that files for a better manage?


thanks best regards my fellows developers.
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 03 avril 2018 - 20:57
Hi Fabrice

Thanks with HChangeDir it's more easy than I tought.

So the question now it's this

How can I Access to the data from a Table on default path of an analysis with another app?
Is it possible?
Do I have to make a backupt and then use HChangeDir?

Thanks.
Best Regards my fellows developers.
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 03 avril 2018 - 21:53
Hi everyone

I tried to use HSubstDir but It doesn't do what I want, it's like using HChangeDir but create a new .fic and the one it's on the default the data it's erase.

So I'm not sure What I can do with the data on default path.

Thanks.
Best Regards.
Posté le 03 avril 2018 - 23:07
as I staed before, in android and ios, only the app can access data in
default path...

Which is why I told you already that you would need to change the
directory of the data


Le 4/3/2018 à 1:53 PM, Jose a écrit :
Hi everyone

I tried to use HSubstDir but It doesn't do what I want, it's like using
HChangeDir but create a new .fic and the one it's on the default the
data it's erase.

So I'm not sure What I can do with the data on default path.

Thanks.
Best Regards.
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 04 avril 2018 - 15:29
Hi Fabrice

Yeah I know you said that but on that time I never tought I need to do this so well I need to resolve this problem
I do something weird but it work in someway not that I want it but it work.

First: I use fCopyFile on the APP A and copy my .Fic from default path on a path that every app could access then I use HChangeDir on APP A because I need the user keep using the APP A.

Second: On APP B I create the same table on my Analysis and then I use HChangeDir to direct my DB on that Table where all apps could access and see the same data that it was on APP A the APP B it will see it too.


Maybe with this method could work.
What Do you Think Fabrice? Is it viable?
Best Regards my fellow developers.
Posté le 04 avril 2018 - 16:47
sure... it can work... As a result, it will also put your files in a
place where the user can delete them...

I do hope that you have a very good reason to do all this...

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on http://www.fabriceharari.com


Le 4/4/2018 à 7:29 AM, Jose a écrit :
Hi Fabrice

Yeah I know you said that but on that time I never tought I need to do
this so well I need to resolve this problem
I do something weird but it work in someway not that I want it but it work.

First: I use fCopyFile on the APP A and copy my .Fic from default path
on a path that every app could access  then I use HChangeDir on APP A
because I need the user keep using the APP A.

Second: On APP B I create the same table on my Analysis and then I use
HChangeDir to direct my DB on that Table where all apps could access and
see the same data that it was on APP A the APP B it will see it too.


Maybe with this method could work.
What Do you Think Fabrice? Is it viable?
Best Regards my fellow developers.
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 04 avril 2018 - 17:05
Hi Fabrice

Yeah... that it's the bad thing with the User but I can block the Files from default device and do my work then I will change everything like normal.

Thanks Fabrice for all of your help
Best regards my fellow developer.