Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

ADS LOCAL and Server

5 posts in Xbase++ Last posting was on 2007-10-17 08:31:33.0Z
Data Devices Posted on 2007-10-15 12:10:55.0Z
From: Data Devices <kiron@datadevicesindia.com>
Newsgroups: Advantage.Xbase++
Subject: ADS LOCAL and Server
Date: Mon, 15 Oct 2007 17:40:55 +0530
Message-ID: <i4m6h31uj3eu2ne46319p1l0gig9qn4q1p@4ax.com>
X-Newsreader: Forte Agent 3.2/32.830
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 122.167.53.243
X-Trace: 15 Oct 2007 06:05:48 -0700, 122.167.53.243
Lines: 7
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!122.167.53.243
Xref: solutions.advantagedatabase.com Advantage.Xbase++:828
Article PK: 1140698

Hi All,

Is there any method to identify whether an applicatione is running on
ADS Server OR ADS Local ?

Regards
Kiron


Joachim Duerr (ADS) Posted on 2007-10-15 13:58:56.0Z
From: "Joachim Duerr (ADS)" <jojo.duerr@gmx.de>
Subject: Re: ADS LOCAL and Server
Newsgroups: Advantage.Xbase++
References: <i4m6h31uj3eu2ne46319p1l0gig9qn4q1p@4ax.com>
Organization: iAnywhere
User-Agent: XanaNews/1.18.1.2
X-Face: ,QMv7[luB)BpWAQ~:"kw6n%0ieY63.:g2K3n~8ky0;||5Xle*Xq+=~<Fy:0CVC2nx@8~vZ
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 130.214.79.11
Message-ID: <47136410@solutions.advantagedatabase.com>
Date: 15 Oct 2007 06:58:56 -0700
X-Trace: 15 Oct 2007 06:58:56 -0700, 130.214.79.11
Lines: 13
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!130.214.79.11
Xref: solutions.advantagedatabase.com Advantage.Xbase++:829
Article PK: 1140699


Data Devices wrote in <i4m6h31uj3eu2ne46319p1l0gig9qn4q1p@4ax.com>:

> Is there any method to identify whether an applicatione is running on
> ADS Server OR ADS Local ?

If you do have the connection handle in your application, just make a
call to AdsGetConnectionType.

--
Joachim Duerr
System Consultant (Advantage Database Server)
Sybase iAnywhere
advantagesupport[AT]ianywhere.com


Paul Posted on 2007-10-15 14:36:09.0Z
Message-ID: <47137AD9.3010904@hoist-technology.com>
Date: Mon, 15 Oct 2007 15:36:09 +0100
From: Paul <paul.hill@hoist-technology.com>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Newsgroups: Advantage.Xbase++
To: Data Devices <kiron@datadevicesindia.com>
Subject: Re: ADS LOCAL and Server
References: <i4m6h31uj3eu2ne46319p1l0gig9qn4q1p@4ax.com>
In-Reply-To: <i4m6h31uj3eu2ne46319p1l0gig9qn4q1p@4ax.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.138.165.82
X-Trace: 15 Oct 2007 08:31:19 -0700, 81.138.165.82
Lines: 19
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!81.138.165.82
Xref: solutions.advantagedatabase.com Advantage.Xbase++:830
Article PK: 1140700


Data Devices wrote:
> Hi All,
>
> Is there any method to identify whether an applicatione is running on
> ADS Server OR ADS Local ?

Hi Kiron,

Try this:

nServerType := oDacSession:setProperty( ADSDBE_SERVER_TYPE )
IF nServerType == ADSDBE_LOCAL .OR. nServerType == 0
cTxt := "Local"
ELSE
cTxt := "Remote"
ENDIF

--
Paul


Pascal Boivin Posted on 2007-10-15 15:00:14.0Z
Message-ID: <NBTM6AFB2A29@nbautomation.mailtraq>
To: Advantage.Xbase++
Date: Mon, 15 Oct 2007 11:00:14 -0400
Lines: 36
From: "Pascal Boivin" <pascal.boivin@nbautomation.com>
Subject: Re: ADS LOCAL and Server
Newsgroups: Advantage.Xbase++
References: <i4m6h31uj3eu2ne46319p1l0gig9qn4q1p@4ax.com>
User-Agent: XanaNews/1.18.1.6
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
NNTP-Posting-Host: 69.70.11.19
X-Trace: 15 Oct 2007 09:14:14 -0700, 69.70.11.19
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!nbautomation.mailtraq!anonymous
Xref: solutions.advantagedatabase.com Advantage.Xbase++:831
Article PK: 1140702

Here is some code from my custom AdsExt.PRG

#define ADS_LOCAL_SERVER 1
#define ADS_REMOTE_SERVER 2
#define ADS_INTERNET_SERVER 4
#define ADSDLL "ACE32.DLL"

...
snAdsDllHandle := DllLoad( ADSDLL )
...
cConnect := "DBE=" + cDriver + ";SERVER=" + cPath + ";UID=" + cUID
oSession := DacSession():new(cConnect, .F.)
N := AX_GetConnectionType(oSession:GetConnectionHandle())
Do Case
Case N == ADS_LOCAL_SERVER
Case N == ADS_REMOTE_SERVER
Case N == ADS_INTERNET_SERVER
EndCase
...

FUNCTION AX_GetConnectionType(nHandle)
LOCAL nConnectionType := 0, nRetVal

nRetVal := DllCall( snAdsDllHandle, DLL_STDCALL,
"AdsGetConnectionType", nHandle, ;
@nConnectionType)

RETURN nConnectionType


--
************************
* Pascal Boivin *
* N.B. Automation inc. *
************************


Data Devices Posted on 2007-10-17 08:31:33.0Z
From: Data Devices <kiron@datadevicesindia.com>
Newsgroups: Advantage.Xbase++
Subject: Re: ADS LOCAL and Server
Date: Wed, 17 Oct 2007 14:01:33 +0530
Message-ID: <02ibh3127d8srnf4jkp47ql4scglbnjesn@4ax.com>
References: <i4m6h31uj3eu2ne46319p1l0gig9qn4q1p@4ax.com>
X-Newsreader: Forte Agent 3.2/32.830
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 122.167.53.245
X-Trace: 17 Oct 2007 02:26:21 -0700, 122.167.53.245
Lines: 6
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!122.167.53.245
Xref: solutions.advantagedatabase.com Advantage.Xbase++:833
Article PK: 1140703

Hi all ,

Thank you verymuch

Regards
Kiron