First of all, sorry for my bad english.
Could someone help me to use ads with file.add in local mode.
How to create it?, how to use it?
Thank you very much.
Best regards, Ruben Fernandez.
ads an advantage data dictionary ?
-
- Posts: 366
- Joined: Wed Aug 30, 2006 5:25 pm
- Location: Uruguay
ads an advantage data dictionary ?
Gracias y Saludos
Ruben Fernandez - Uruguay
FWH 11.06, Harbour, Borland 5.82
Ruben Fernandez - Uruguay
FWH 11.06, Harbour, Borland 5.82
-
- Posts: 1033
- Joined: Fri Oct 07, 2005 3:33 pm
- Location: Cochabamba - Bolivia
Re: ads an advantage data dictionary ?
Hola Ruben
First you can create Advantage Data Dictionary with ARC (utility from Sybase fro manage ADS database, DBF,CDX,NTX,ADT...)
then the follow can show you a simple sample to connect to the ADD
In this case de ADD "testadd.add" has defined a test adt table, then you can use the alias 'test' like always,
I hope this can be help for you
regards
Marcelo
First you can create Advantage Data Dictionary with ARC (utility from Sybase fro manage ADS database, DBF,CDX,NTX,ADT...)
then the follow can show you a simple sample to connect to the ADD
Code: Select all
#include "fivewin.ch"
#include "ads.ch"
#include "xbrowse.ch"
function main()
RddRegister( "ADS", 1 )
rddsetdefault( "ADS" )
AdsSetServerType( ADS_LOCAL_SERVER )
adsConnect60( "testadd.add", 1, "ADSSYS", "" )
use test new
xBrowse()
DBCLOSEALL()
ADSDISCONNECT()
return nil
I hope this can be help for you
regards
Marcelo
-
- Posts: 366
- Joined: Wed Aug 30, 2006 5:25 pm
- Location: Uruguay
Re: ads an advantage data dictionary ?
Marcelo, thank you very much.
I'll try.
Best regards
Ruben Fernandez.
I'll try.
Best regards
Ruben Fernandez.
Gracias y Saludos
Ruben Fernandez - Uruguay
FWH 11.06, Harbour, Borland 5.82
Ruben Fernandez - Uruguay
FWH 11.06, Harbour, Borland 5.82
- reinaldocrespo
- Posts: 918
- Joined: Thu Nov 17, 2005 5:49 pm
- Location: Fort Lauderdale, FL
Re: ads an advantage data dictionary ?
Hi.
Marcelo's approach is the most common and you will probably enjoy using ARC. As an alternative, here is some code to create the DD rather than by using Arc. One of the advantages of creating the DD with code is that you can actually deliver you app and let it create the DD as well as tables, indexes, triggers, RI rules, etc.. from an installation program. Such app could be tailored to create, as well as maintain, any DD object ( such as tables, triggers, indexes, RI Rules, Functions, stored procedures...) as needed. Here is the code to create the DD using ACE functions fro x/harbour:
It might also be a good idea to create the tables with code and to include them in the dd. You can do this using the create table sql statement. It is all very well documented on the help files.
Hope that helps,
Reinaldo.
Marcelo's approach is the most common and you will probably enjoy using ARC. As an alternative, here is some code to create the DD rather than by using Arc. One of the advantages of creating the DD with code is that you can actually deliver you app and let it create the DD as well as tables, indexes, triggers, RI rules, etc.. from an installation program. Such app could be tailored to create, as well as maintain, any DD object ( such as tables, triggers, indexes, RI Rules, Functions, stored procedures...) as needed. Here is the code to create the DD using ACE functions fro x/harbour:
Code: Select all
#include "ads.ch"
//------------------------------------------------------------------------------
METHOD createNewDD() CLASS MpAdmin
if !AdsConnect60( ::xRDDPath, ::nAdsServerType, "ADSSYS" )
ADSDDCREATE( ::xRddPath,, "mp9 system data dictionary" )
Endif
AdsDDSetDatabaseProperty( ADS_DD_ENABLE_INTERNET, .t. )
AdsDDSetDatabaseProperty( ADS_DD_INTERNET_SECURITY_LEVEL, ADS_DD_LEVEL_2 )
//Adssys is the administrator user.
AdsDDCreateUser( , "AdsSys", "mp9", "System Administrator" )
//create a few default users -perhaps?
AdsDDCreateUser( , "x12", "mp9", "x12 document users" )
AdsDDCreateUser( , "MpRecs9", "mp9", "Admissions and Records users" )
AdsDDCreateUser( , "Mpbill9", "mp9", "Billing users" )
AdsDDCreateUser( , "TriageUser", "Triage9", "Triage App users" )
AdsDDCreateUser( , "MpPharm9", "mp9", "Nutritional dept users" )
AdsDDCreateUser( , "mpdiet9", "mp9", "Nutritional dept users" )
AdsDDCreateUser( , "MpLab9", "mp9", "Billing users" )
AdsDDCreateUser( , "MpOrders9", "mp9", "Floor Orders users" )
AdsDDCreateUser( , "hl7service", "hl7", "HL7 charges over tcp server service" )
AdsDDCreateUser( , "adtservice", "adt", "ADT over tcp client service" )
AdsDDCreateUser( , "cashier", "mp9", "MpCashier App users" )
AdsDDCreateUser( , "AutoReg_User", "mp9", "ER Patient Autoregister App Users" )
//set adssys password
AdsDDSetDatabaseProperty( ADS_DD_ADMIN_PASSWORD, "mp9" )
AdsDDSetDatabaseProperty( ADS_DD_LOG_IN_REQUIRED, .t. ) // this disables anonymous connections
// set ADS_DD_VERIFY_ACCESS_RIGHTS to .f. to allow all users to
// have all access rights. Set to .t. to enforce group and user rights, thus
//incrementing the level of security -(I recommend it).
AdsDDSetDatabaseProperty( ADS_DD_VERIFY_ACCESS_RIGHTS, .T. )
Return Nil
Hope that helps,
Reinaldo.
-
- Posts: 366
- Joined: Wed Aug 30, 2006 5:25 pm
- Location: Uruguay
Re: ads an advantage data dictionary ?
Reinaldo:
Thank you very much. I'm a new user of ADS, so, all information, and sugestions are welcome.
Thank you.
Best regards
Ruben Fernandez.
Thank you very much. I'm a new user of ADS, so, all information, and sugestions are welcome.
Thank you.
Best regards
Ruben Fernandez.
Gracias y Saludos
Ruben Fernandez - Uruguay
FWH 11.06, Harbour, Borland 5.82
Ruben Fernandez - Uruguay
FWH 11.06, Harbour, Borland 5.82