Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Some assistance for using AIS

78 views
Skip to first unread message

Frank M

unread,
May 9, 2013, 5:15:20 AM5/9/13
to
Hello,
i want to check if my Application run suitable with ADS / AIS over Internet.
So i need some assistance from you. I think much of you using ADS/AIS?

When using AIS or ADS DD i have no direct access to the Filesystem, ok. So i write some C# AEP to read / write Textfile from client to Server over Internet.

Now i have no idea what is the best way to get the Filelist from the Server?
I mean the Directory() function from VO. The count of the files is maybe over 10000?
One other Problem to transport Images from/to Server. I know the way is to write a blob, but have no luck with Sample Code from C#.

Any suggestions?
Regards, Frank


D.J.W. van Kooten

unread,
May 10, 2013, 10:06:29 AM5/10/13
to
On Thu, 9 May 2013 02:15:20 -0700 (PDT), Frank M
<frank_m...@gmx.de> wrote:

Hello Frank,

>Hello,
>i want to check if my Application run suitable with ADS / AIS over Internet.
>So i need some assistance from you. I think much of you using ADS/AIS?

I am not sure what you want to do with ADS as you are mainly talking
about getting a directory list and uploading pictures. With ADS you
can open DBF files on an internet server from your PC or PC server
program. I have written code for but my client ended up choosing for
MySQL. With the standard VO SQL classes and an ODBC connection
directly to the MySQL server of my client exchanging data turned out
to be faster and easier than it was with ADS. The latest ADS versions
have Appache technology to exchange data, but that is not usuable at
all without Appache installed on servers.


>When using AIS or ADS DD i have no direct access to the Filesystem, ok. So i write some C# AEP to read / write Textfile from client to Server over Internet.

I think you just need to use FTP for that.

>Now i have no idea what is the best way to get the Filelist from the Server?
>I mean the Directory() function from VO. The count of the files is maybe over 10000?

See the 2 VO methods below.

>One other Problem to transport Images from/to Server. I know the way is to write a blob, but have no luck with Sample Code from C#.

Also FTP would be the easiest way to achieve that. I think there are
samples doing just that, otherwise drop me a mail and I send you my
full mef with FTP functions to use.

Dick

>
METHOD GetFtpDir (a AS ARRAY) AS ARRAY PASCAL CLASS FtpWin
//#s Get FTp content strong typed 14-4-2010
//#s
//#x
//#l
//#l
//#l
//#l
//#p
//#p
//#r
//#e
//#e
LOCAL n,i AS DWORD
LOCAL aDir AS ARRAY
LOCAL aRet AS ARRAY
LOCAL aFirst AS ARRAY
LOCAL aFiles AS ARRAY
LOCAL cName AS STRING

n := ALen(a)

aFirst := {}
aRet := {}
aDir := {}
aFiles := {}

FOR i := 1 TO n
IF At2("D", a[i, F_ATTR]) > 0
IF a[i, F_NAME] = "."
IF a[i, F_NAME] = ".."
aFirst := {"[..]", "<Dir>", a[i, F_DATE], a[i,
F_TIME], a[i, F_ATTR] }
ENDIF
ELSE
AAdd(aDir,{a[i, F_NAME], "<Dir>", a[i, F_DATE], a[i,
F_TIME], a[i, F_ATTR] })
ENDIF
ELSE
AAdd(aFiles, a[i])
ENDIF
NEXT

IF ALen(aFirst) = 0
aFirst := {"[..]", "<Dir>", Today(), Time(), "D"}
ENDIF

AAdd(aRet, aFirst)

n := ALen(ADir)
FOR i := 1 TO n
cName := ADir[i, F_NAME]
IF At2("[", cName) = 0
cName := "[" + ADir[i, F_NAME] + "]"
ADir[i,F_NAME] := cName
ENDIF
AAdd(aRet, ADir[i])
NEXT

n := ALen(aFiles)

FOR i := 1 TO n
AAdd(aRet, aFiles[i] )
NEXT

RETURN aRet
METHOD GetFtpFilesInDir (cFromDir AS STRING, cDoelDir AS STRING,
cWildCard AS STRING, oStatusControl AS OBJECT, cFTPDir AS STRING,
aLogin AS ARRAY,lSilent AS LOGIC) AS ARRAY PASCAL CLASS FtpWin
//#s Returns directory 6-4-2006
//#s Strong typed 11-4-2010
//#x
//#l
//#l
//#l
//#l
//#p
//#p
//#r
//#e
//#e

LOCAL aDir AS ARRAY

// Default(@aLogin,{}) // 25-8-2004

aDir:={}

IF SELF:FTPConnect(oStatusControl,cFromDir,aLogin,lSilent)
IF !IsNil(cFTPDir) // 17-8-2004
IF !Empty(cFTPDir)
aDir:=SELF:oFTP:Directory()
ENDIF
ENDIF
IF !IsNil(oStatusControl) // 6-4-2004
oStatusControl:Caption:=Vt(MSG_READY,"Gereed")
ENDIF
ENDIF
SELF:FTPDisconnect()

RETURN aDir

Frank M

unread,
May 11, 2013, 3:13:16 PM5/11/13
to
Hi Dick,

thanks for info, but MySql or other DB is no Option for me.
My Goal is that i have one Code for Lokal App that use VO RDD / ALS / ADS / ADS DD and AIS DD. (i have only DBF Tables)
After one week work i have a working app, with DBF and FastReport Reports.
My first Test is that the speed is much better then i think.
To write come C# AEP is not so difficult, but my C# / .NET knowledge is not so great.
I have a solution for Copy Text Files from/to AIS Server but at time problems with blobs. Ftp is a option, but not the way i will go.

Regards, Frank

richard.townsendrose

unread,
May 12, 2013, 5:21:08 AM5/12/13
to
Frank

I agree with you ... one set of code for all situations.

Firts of all if you need appache, then it is a 5 minute job to download and install xampp - http://sourceforge.net/projects/xampp/ for example. windows, linux, just choose your os, download and away you go.

On VO Code, i can sebnd you our stuff.

the MAIN difference is between having ADS and not having ADS, and if you have ADS whether ot not your are using a data dictionary - which is needed for connecting over the internet.

so you have three cases:
NO ADS
ADS NO DD
ADS DD

First two situations require that you check that all tables exist. DD does it for you.

I have lots of code i can send you if wanted

i have been very quiet because i have been bring five web sites up to joomla 2.5.11 from various lower versions - one of which was on the 1 and 1 hosting and was seriously hacked ... moved it to fasthostingdirect.co.uk .... when the storm approached they took measures to prevent cms's being broken into and lost not one.

richard

richard

Frank M

unread,
May 12, 2013, 11:19:48 AM5/12/13
to
Richard,

i have the same Problem with my Joomla 1.5.15 Homepage, hacked in January. My Provider block all my User, so i must very fix tranport to Joomla 2.5.

When you share the VO Code, that where very fine.

Regards, Frank

Am Donnerstag, 9. Mai 2013 11:15:20 UTC+2 schrieb Frank M:
0 new messages