In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Trying to switch to ADS

Foro público de Xailer en español
Responder
Maarten Roos
Mensajes: 126
Registrado: Lun Mar 29, 2010 10:24 am

Trying to switch to ADS

Mensaje por Maarten Roos »

[sorry wrong forum]
First of all, I have purchased and should be posting in 'Xailer Pro English', but couldn't change my current account to do so?
Now the real issue:
I have a little program and it is total set for local environment (CDXDataSource) and it runs well. Now I want to use the program in a network environment (and later it should be accessible through internet), so I am testing ADS.
Installed ADS and it is working. I also created a .add file and added tables to it. I think I should be finished here with configuring ADS?
Configured the little program:
Procedure Main()
REQUEST ADS
RddRegister("ADS",1)
RddSetDefault("ADS")
ADSSetServerType(2)
AdsSetFileType(2)
REQUEST ADSKEYCOUNT, ADSKEYNO, ADSGETRELKEYPOS, ADSSETRELKEYPOS
Application:cTitle := "EMS Windows"
Application:oIcon := "ems"
/*
WITH OBJECT TIni():New( ".ems.ini" )
SetLanguage( :GetEntry( "OPTIONS", "Language", 0 ) )
END
*/
TFormMain():New( Application ):Show()
Application:Run()
Return
and using:
METHOD ConnectToEMSADSServer( oSender ) CLASS TFormMain
IF AdsConnect60( "10.2.1.182:6262EMSDataemsdata.add", 2,"XXXX","XXXX")
AdsRightsCheck(.F.)
AdsLocking(.F.)
USE users alias TEST via "dbfcdx"
ELSE
MsgStop("NO")
QUIT
ENDIF

RETURN Nil
The AdsConnect60 is true... but now i am lost? If i try after AdsConnect60 to connect to a database with the USE command it says dos error 2?
Not quite sure what I am doing wrong?
I have also the following ads.ini:
ads.ini
[EMSServer]
LAN_IP=10.2.1.182
LAN_PORT=6262
[SETTINGS]
ADS_SERVER_TYPE = 2
[SETTINGS]
ADS_FORCE_CLIPPER_MEMOS = 1
RETRY_ADS_CONNECTS = 1
But if I try:
IF AdsConnect60( "10.2.1.182:6262EMSDataemsdata.add", 2,"XXXX","XXXX")
it works, but if I try:
IF AdsConnect60( "EMSServerEMSDataemsdata.add", 2,"XXXX","XXXX")
It fails to work?
Probably I should also switch from TCdxDataSource to TAdsDataSource, but also not sure what to do there? Must I fill out "cConnect", "cPassword" and "cUser" again and set lUseDictionary to true? I tried is but can't get it to work?
Who can help me?
Maarten Roos
nospam
Mensajes: 71
Registrado: Sab Nov 21, 2009 10:13 pm

Trying to switch to ADS

Mensaje por nospam »

Marteen:
Ok ok, let's try to make it simple.
> I have a little program and it is total set for local
> environment (CDXDataSource) and it runs well. Now I want to
> use the program in a network environment (and later it
> should be accessible through internet), so I am testing
> ADS.
>
> Installed ADS and it is working. I also created a .add file
> and added tables to it. I think I should be finished here
> with configuring ADS?
BEEEEEP
You don't need to create an .ADD file, you can keep using the DBFCDX
tables as "free tables", ADD files will be necesary for internet access
but in your first attempt you don't need it at all.
> The AdsConnect60 is true... but now i am lost? If i try
> after AdsConnect60 to connect to a database with the USE
> command it says dos error 2?
Yes it is, because if you are connected to an ADD you have to include
the DBFCDX tables inside the ADD, then you simply:
AdsConnect60(......)
USE TABLENAME
Not need to pass the path since all the stuff is under ADD control.
How ever if you are using free tables, don't use the AdsConnect60() and
do a simple:
use c:pathdbftable
ADS sould recognize the table and open it.
> ads.ini
> [EMSServer]
> LAN_IP=10.2.1.182
> LAN_PORT=6262
>
> [SETTINGS]
> ADS_SERVER_TYPE = 2
>
> [SETTINGS]
> ADS_FORCE_CLIPPER_MEMOS = 1
> RETRY_ADS_CONNECTS = 1
Be aware that the settings in the ADS.INI file overwrites the settings
you used in the source coce.
>
> But if I try:
> IF AdsConnect60( "10.2.1.182:6262EMSDataemsdata.add",
> 2,"XXXX","XXXX")
>
> it works, but if I try:
>
> IF AdsConnect60( "EMSServerEMSDataemsdata.add",
> 2,"XXXX","XXXX")
>
> It fails to work?
It depends on the ADS version you are using, if you are using ADS 9.0,
there's some issue regarding the connection using a server name, try to
update to ADS 9.1. Also be sure you are using the RDDADS LIB for ADS 9.1
since the (x)Harbour LIB included in Xailer is for ADS ver. 8.x
> Probably I should also switch from TCdxDataSource to
> TAdsDataSource, but also not sure what to do there? Must I
> fill out "cConnect", "cPassword" and "cUser" again and set
> lUseDictionary to true? I tried is but can't get it to
> work?
As I explained you before, you don't need a ADD in your first ADS
attempt (in fact will be a little more complicate if is your first
approach to ADS), try to use first an ADS DataSource:
cConnect:= path where the tables are hosted
cPassword and cUser are not needed since you are not using an ADD
If you are using an ADD:
cConnect := path and ADD name
cUser := add user name
cPassword := add user pwd
Be sure to set the lUseDictionary flag to .T.
Then attach a DBF DataSet and that's all.
Feel free to ask about ADS for Xailer in this or in the english forum
I'll be glad to answer.
Rene Flores (your local ADS Advisor ;-) )
http://www.ciber-tec.com
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9441
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Trying to switch to ADS

Mensaje por ignacio »

Maarten,
First of all. Please send a private Email to support@xailer.com indicating
your Xailer serial number, a correct email address and a login name. We will
do the modification for you on the Web support forum.
If you have any problem with ADS I suggest the following:
1) Consult the error number reported by ADS on its documentation. Surely it
will give some clue.
2) Try to open the file first with the Advantage Database Architect
3) Try to open the file without using Xailer datacontrols at all
4) Finally open the file with Xailer datacontrols
Regards,
"Maarten Roos" <maarten[at]ecem[dot]com> escribió en el mensaje de
noticias:4c503892$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> First of all, I have purchased and should be posting in
> 'Xailer Pro English', but couldn't change my current account
> to do so?
>
> Now the real issue:
>
> I have a little program and it is total set for local
> environment (CDXDataSource) and it runs well. Now I want to
> use the program in a network environment (and later it
> should be accessible through internet), so I am testing
> ADS.
>
> Installed ADS and it is working. I also created a .add file
> and added tables to it. I think I should be finished here
> with configuring ADS?
>
> Configured the little program:
>
> Procedure Main()
> REQUEST ADS
> RddRegister("ADS",1)
> RddSetDefault("ADS")
> ADSSetServerType(2)
> AdsSetFileType(2)
>
> REQUEST ADSKEYCOUNT, ADSKEYNO, ADSGETRELKEYPOS,
> ADSSETRELKEYPOS
>
> Application:cTitle := "EMS Windows"
> Application:oIcon := "ems"
> /*
> WITH OBJECT TIni():New( ".ems.ini" )
> SetLanguage( :GetEntry( "OPTIONS", "Language", 0 ) )
> END
> */
> TFormMain():New( Application ):Show()
> Application:Run()
>
> Return
>
> and using:
>
> METHOD ConnectToEMSADSServer( oSender ) CLASS TFormMain
>
> IF AdsConnect60( "10.2.1.182:6262EMSDataemsdata.add",
> 2,"XXXX","XXXX")
> AdsRightsCheck(.F.)
> AdsLocking(.F.)
> USE users alias TEST via "dbfcdx"
> ELSE
> MsgStop("NO")
> QUIT
> ENDIF
> RETURN Nil
>
> The AdsConnect60 is true... but now i am lost? If i try
> after AdsConnect60 to connect to a database with the USE
> command it says dos error 2?
>
> Not quite sure what I am doing wrong?
>
> I have also the following ads.ini:
>
> ads.ini
> [EMSServer]
> LAN_IP=10.2.1.182
> LAN_PORT=6262
>
> [SETTINGS]
> ADS_SERVER_TYPE = 2
>
> [SETTINGS]
> ADS_FORCE_CLIPPER_MEMOS = 1
> RETRY_ADS_CONNECTS = 1
>
> But if I try:
> IF AdsConnect60( "10.2.1.182:6262EMSDataemsdata.add",
> 2,"XXXX","XXXX")
>
> it works, but if I try:
>
> IF AdsConnect60( "EMSServerEMSDataemsdata.add",
> 2,"XXXX","XXXX")
>
> It fails to work?
>
> Probably I should also switch from TCdxDataSource to
> TAdsDataSource, but also not sure what to do there? Must I
> fill out "cConnect", "cPassword" and "cUser" again and set
> lUseDictionary to true? I tried is but can't get it to
> work?
>
> Who can help me?
>
> Maarten Roos
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Maarten Roos
Mensajes: 126
Registrado: Lun Mar 29, 2010 10:24 am

Trying to switch to ADS

Mensaje por Maarten Roos »

Rene,
thank you for the reply... I had it up and running shortly after I posted and it is working good! I am impressed about it's speed and I use a simple HP computer with XP as server. It is working with ADD files, because I know that is what we want in the near future; the data must be accessible through internet (from Japan, Brasil, China etc) and by network (here in Amsterdam).
About ads.ini:
I can modify the silliest things in it, but it has no effect for the program, but you are saying:Be aware that the settings in the ADS.INI file overwrites the settings you used in the source coce.How come?
About maintenance:
How do I re-index/pack? I think the directory() is not working for ADD files?
About rddads.lib:It depends on the ADS version you are using, if you are using ADS 9.0, there's some issue regarding the connection using a server name, try to update to ADS 9.1. Also be sure you are using the RDDADS LIB for ADS 9.1 since the (x)Harbour LIB included in Xailer is for ADS ver. 8.xI am testing with ADS 9.10 and using the (x)Harbour LIB for rddads? No problems encountered? But to use rddads lib for ADS 9.1, where to find this version?
About DOS and Windows versions together in same database:
It is possible to work with DOS Clipper app and Windows app with same databases, I already found out. Except for the Ansi and OEM problems I didn't notice any problems. Now ADS is working I encountered problems with the index files. Some of them have UDF's and my quess is that ADS cannot work with UDF's?
Well that is all for now... I am going to search the instructions for getting the old clipper app communicate with ADS.
Thank you in advantage.
Responder