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.

Distribute 32bit and 64bit AEP

4 posts in AEP Last posting was on 2012-02-17 10:41:41.0Z
Michael Meller Posted on 2012-02-16 13:56:06.0Z
Reply-To: "Michael Meller" <m.meller@futura-solutions.de>
From: "Michael Meller" <m.meller@futura-solutions.de>
Newsgroups: advantage.AEP
Subject: Distribute 32bit and 64bit AEP
Date: Thu, 16 Feb 2012 14:56:06 +0100
Lines: 19
Organization: Futura Solutions GmbH
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 213.23.47.254
Message-ID: <4f3d0acd@solutions.advantagedatabase.com>
X-Trace: 16 Feb 2012 05:55:25 -0700, 213.23.47.254
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.AEP:834
Article PK: 1104110

In the setup of our application we can't check, if the customer has 32bit or
64bit ADS. It is also possible, that the customer upgrades the ADS from
32bit to 64bit at any time. So in our setup we have to distribute a 32bit
and a 64bit Version of our AEP (dll). The problem is now, in the properties
of a stored proc in the ADD you can only assign one AEP file. Shouldn't
there be the feature now, to assign one 32bit and one 64bit AEP file, for
the reason of compability of an ADD with 32bit and 64bit ADS?

If there is no standard solution for this problem, we could distribute two
copies of the ADD with two different ADD and AEP filnames or we assign the
AEP filname at runtime (if possible). Then the application has to check if
ADS 32 or 64 is running and use the corresponding ADD or assign the right
filename (renaming the AEP files by the application is not possible, because
the user often has no rights on the data folder).
So if we have to go this way, there result two questions:
1. Can I assign the AEP filename to a stored proc (ADD) at runtime?
2. Can the application check, if the running ADS Version is 32bit or 64bit?


Joachim Duerr (ADS) Posted on 2012-02-16 14:24:43.0Z
From: "Joachim Duerr (ADS)" <jojo.duerr@gmx.de>
Subject: Re: Distribute 32bit and 64bit AEP
Newsgroups: Advantage.AEP
References: <4f3d0acd@solutions.advantagedatabase.com>
Date: Thu, 16 Feb 2012 15:24:43 +0100
User-Agent: XanaNews/1.19.1.269
X-Face: u2p+</,mb|Ah!x!/qxX5q0t:O~.<1&JzwNHYhSqcviY{~&|iDc"U.Je1A.ZeHR`d;;y#R
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 10.29.66.103
Message-ID: <4f3d111e$1@solutions.advantagedatabase.com>
X-Trace: 16 Feb 2012 06:22:22 -0700, 10.29.66.103
Lines: 45
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.AEP:835
Article PK: 1104111


Michael Meller wrote:

>1. Can I assign the AEP filename to a stored proc (ADD) at runtime?

yes.
Just export the SQL command to create the AEP with ARC (right
mouse->Generate SQL Script) and replace the filename/path to the AEP
before running it from your application:

CREATE PROCEDURE myProc(i Integer,o Memo OUTPUT)
FUNCTION "MyProcedure"
IN LIBRARY "MyAEP32";

or

CREATE PROCEDURE myProc(i Integer,o Memo OUTPUT)
FUNCTION "MyProcedure"
IN LIBRARY "MyAEP64";

or (if it already exists with the wrong architecture)

ALTER PROCEDURE myProc(i Integer,o Memo OUTPUT)
FUNCTION "MyProcedure"
IN LIBRARY "MyAEP64";


select * from system.storedprocedures
--? where proc_dll_name like '%32%'

gives you an overview on stored procedures - so you could alter it if
it's the wrong architecture or create it if it doesn't already exist.


>2. Can the application check, if the running ADS Version is 32bit or
>64bit?

execute procedure sp_mggetservertype()
returns (on my machine) 7 as ServerTypeVaklue if it's x64 on win7x64
and 2 for the x32 on Win7 (WOW64).

--
Joachim Duerr, Advantage Presales
*** NEW *** Advantage Pocket Guide released *** NEW ***
http://pocketguide.jd-engineering.de


Michael Meller Posted on 2012-02-17 09:41:30.0Z
Reply-To: "Michael Meller" <m.meller@futura-solutions.de>
From: "Michael Meller" <m.meller@futura-solutions.de>
Newsgroups: Advantage.AEP
References: <4f3d0acd@solutions.advantagedatabase.com> <4f3d111e$1@solutions.advantagedatabase.com>
Subject: Re: Distribute 32bit and 64bit AEP
Date: Fri, 17 Feb 2012 10:41:30 +0100
Lines: 63
Organization: Futura Solutions GmbH
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 213.23.47.254
Message-ID: <4f3e20a0$1@solutions.advantagedatabase.com>
X-Trace: 17 Feb 2012 01:40:48 -0700, 213.23.47.254
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.AEP:836
Article PK: 1104114

Thank's Joachim,

to check for 64bit I call

AdsMgConnect(path, nil, nil, @hMgmtHandle );
AdsMgGetServerType(hMgmtHandle, @usServerType);
AdsMgDisConnect(hMgmtHandle );
if usServerType >= 7 ...

This should work in future cases too, I hope.

Regards
Michael

"Joachim Duerr (ADS)" <jojo.duerr@gmx.de> schrieb im Newsbeitrag
news:4f3d111e$1@solutions.advantagedatabase.com...

> Michael Meller wrote:
>
>>1. Can I assign the AEP filename to a stored proc (ADD) at runtime?
>
>
> yes.
> Just export the SQL command to create the AEP with ARC (right
> mouse->Generate SQL Script) and replace the filename/path to the AEP
> before running it from your application:
>
> CREATE PROCEDURE myProc(i Integer,o Memo OUTPUT)
> FUNCTION "MyProcedure"
> IN LIBRARY "MyAEP32";
>
> or
>
> CREATE PROCEDURE myProc(i Integer,o Memo OUTPUT)
> FUNCTION "MyProcedure"
> IN LIBRARY "MyAEP64";
>
> or (if it already exists with the wrong architecture)
>
> ALTER PROCEDURE myProc(i Integer,o Memo OUTPUT)
> FUNCTION "MyProcedure"
> IN LIBRARY "MyAEP64";
>
>
> select * from system.storedprocedures
> --? where proc_dll_name like '%32%'
>
> gives you an overview on stored procedures - so you could alter it if
> it's the wrong architecture or create it if it doesn't already exist.
>
>
>>2. Can the application check, if the running ADS Version is 32bit or
>>64bit?
>
> execute procedure sp_mggetservertype()
> returns (on my machine) 7 as ServerTypeVaklue if it's x64 on win7x64
> and 2 for the x32 on Win7 (WOW64).
>
> --
> Joachim Duerr, Advantage Presales
> *** NEW *** Advantage Pocket Guide released *** NEW ***
> http://pocketguide.jd-engineering.de


Joachim Duerr (ADS) Posted on 2012-02-17 10:41:41.0Z
From: "Joachim Duerr (ADS)" <jojo.duerr@gmx.de>
Subject: Re: Distribute 32bit and 64bit AEP
Newsgroups: Advantage.AEP
References: <4f3d0acd@solutions.advantagedatabase.com> <4f3d111e$1@solutions.advantagedatabase.com> <4f3e20a0$1@solutions.advantagedatabase.com>
Date: Fri, 17 Feb 2012 11:41:41 +0100
User-Agent: XanaNews/1.19.1.269
X-Face: u2p+</,mb|Ah!x!/qxX5q0t:O~.<1&JzwNHYhSqcviY{~&|iDc"U.Je1A.ZeHR`d;;y#R
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 10.29.66.103
Message-ID: <4f3e2e56$1@solutions.advantagedatabase.com>
X-Trace: 17 Feb 2012 02:39:18 -0700, 10.29.66.103
Lines: 19
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.AEP:837
Article PK: 1104115


Michael Meller wrote:

>to check for 64bit I call
>
>AdsMgConnect(path, nil, nil, @hMgmtHandle );
>AdsMgGetServerType(hMgmtHandle, @usServerType);
>AdsMgDisConnect(hMgmtHandle );
>if usServerType >= 7 ...
>
>This should work in future cases too, I hope.

your question inspired me to a blog post:

http://joachimduerr.blogspot.com/2012/02/automatically-load-32-or-64-bit.html

--
Joachim Duerr, Advantage Presales
*** NEW *** Advantage Pocket Guide released *** NEW ***
http://pocketguide.jd-engineering.de