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