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.

ACE or ODBC

3 posts in FoxPro Last posting was on 2011-12-18 20:03:10.0Z
Wayne Yeung Posted on 2011-12-15 03:31:59.0Z
From: "Wayne Yeung" <yeungmwayne@gmail.com>
Newsgroups: advantage.foxpro
Subject: ACE or ODBC
Date: Wed, 14 Dec 2011 22:31:59 -0500
Lines: 11
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: 184.56.65.187
Message-ID: <4ee96a9b@solutions.advantagedatabase.com>
X-Trace: 14 Dec 2011 19:33:47 -0700, 184.56.65.187
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.FoxPro:378
Article PK: 1109733

I'm new to Advantage. I'm not sure which to use, Advantage Client Engine
(ACE) or ODBC to access server data.
Which is faster? Can ACE return a VFP cursor?

Can anyone provide some VFP sample code using ACE?


Thanks,
Wayne


Mark Wilkins Posted on 2011-12-15 22:42:24.0Z
From: "Mark Wilkins" <a@b.c>
Newsgroups: advantage.foxpro
References: <4ee96a9b@solutions.advantagedatabase.com>
In-Reply-To: <4ee96a9b@solutions.advantagedatabase.com>
Subject: Re: ACE or ODBC
Date: Thu, 15 Dec 2011 15:42:24 -0700
Lines: 1
Organization: Sybase
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8089.726
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8089.726
NNTP-Posting-Host: 10.6.199.122
Message-ID: <4eea77b0$1@solutions.advantagedatabase.com>
X-Trace: 15 Dec 2011 14:41:52 -0700, 10.6.199.122
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.FoxPro:379
Article PK: 1109734

Hi,

The following link is for a page in the help file that might answer your
questions:

http://devzone.advantagedatabase.com/dz/webhelp/Advantage10.1/master_getting_started_with_visual_foxpro.htm

It would be possible to use the ACE API directly from FoxPro. However, it
would probably be simpler to use some other access mechanism. I don't think
we have the declarations for the ACE APIs for FoxPro, so that would also be
a bit of a barrier to create those. If you are curious, though, the
following snippet shows some calls. I found this in a directory where I had
been playing with some of this stuff. It declares 3 of the ACE prototypes
and calls them. Not terribly useful, but it shows a bit what it would have
to look like.

Declare Long AdsCreateTable In ace32 ;
long ConnectHandle ,;
string TableName ,;
string AliasName ,;
short TableType ,;
short CharType ,;
short LockType ,;
short CheckRights ,;
short MemoSize ,;
string FieldDefs ,;
long @ TableHandle


DECLARE long AdsConnect60 IN ace32 ;
string pucPath,;
short usServerTypes, ;
string pucUser, ;
string pucPassword, ;
long ulOptions, ;
long @phConnect

DECLARE long AdsDisconnect IN ace32 long hConnect

LOCAL TableName as String
LOCAL TableType as Integer
LOCAL hConn as Integer
LOCAL hTable as Integer
LOCAL fields as String


result = AdsConnect60( "x:\w92p1\test.add", 1, "adssys", "", 0, @hConn )
? "Result of connect = " + STR( result )

TableType = 3
TableName = "newtable2"
fields = "c,c,5;"

? 'Creating ADS table: "'+TableName+'" len='+Str(Len(TableName))
result = AdsCreateTable
(hConn,TableName,'',TableType,2,1,2,0,Fields,@hTable)
If result<>0
? 'It failed with result ' + STR(result )
ENDIF

AdsDisconnect( hConn )


Mark Wilkins
Advantage R&D

"Wayne Yeung" <yeungmwayne@gmail.com> wrote in message
news:4ee96a9b@solutions.advantagedatabase.com...
> I'm new to Advantage. I'm not sure which to use, Advantage Client Engine
> (ACE) or ODBC to access server data.
> Which is faster? Can ACE return a VFP cursor?
>
> Can anyone provide some VFP sample code using ACE?
>
>
> Thanks,
> Wayne
>


Wayne Yeung Posted on 2011-12-18 20:03:10.0Z
From: "Wayne Yeung" <yeungmwayne@gmail.com>
Newsgroups: advantage.foxpro
References: <4ee96a9b@solutions.advantagedatabase.com> <4eea77b0$1@solutions.advantagedatabase.com>
Subject: Re: ACE or ODBC
Date: Sun, 18 Dec 2011 15:03:10 -0500
Lines: 85
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
NNTP-Posting-Host: 184.56.65.187
Message-ID: <4eee46d4$1@solutions.advantagedatabase.com>
X-Trace: 18 Dec 2011 12:02:28 -0700, 184.56.65.187
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.FoxPro:380
Article PK: 1109732

Thanks Mark

"Mark Wilkins" <a@b.c> wrote in message
news:4eea77b0$1@solutions.advantagedatabase.com...
> Hi,
>
> The following link is for a page in the help file that might answer your
> questions:
>
> http://devzone.advantagedatabase.com/dz/webhelp/Advantage10.1/master_getting_started_with_visual_foxpro.htm
>
> It would be possible to use the ACE API directly from FoxPro. However, it
> would probably be simpler to use some other access mechanism. I don't
> think we have the declarations for the ACE APIs for FoxPro, so that would
> also be a bit of a barrier to create those. If you are curious, though,
> the following snippet shows some calls. I found this in a directory where
> I had been playing with some of this stuff. It declares 3 of the ACE
> prototypes and calls them. Not terribly useful, but it shows a bit what
> it would have to look like.
>
> Declare Long AdsCreateTable In ace32 ;
> long ConnectHandle ,;
> string TableName ,;
> string AliasName ,;
> short TableType ,;
> short CharType ,;
> short LockType ,;
> short CheckRights ,;
> short MemoSize ,;
> string FieldDefs ,;
> long @ TableHandle
>
>
> DECLARE long AdsConnect60 IN ace32 ;
> string pucPath,;
> short usServerTypes, ;
> string pucUser, ;
> string pucPassword, ;
> long ulOptions, ;
> long @phConnect
>
> DECLARE long AdsDisconnect IN ace32 long hConnect
>
> LOCAL TableName as String
> LOCAL TableType as Integer
> LOCAL hConn as Integer
> LOCAL hTable as Integer
> LOCAL fields as String
>
>
> result = AdsConnect60( "x:\w92p1\test.add", 1, "adssys", "", 0, @hConn )
> ? "Result of connect = " + STR( result )
>
> TableType = 3
> TableName = "newtable2"
> fields = "c,c,5;"
>
> ? 'Creating ADS table: "'+TableName+'" len='+Str(Len(TableName))
> result = AdsCreateTable
> (hConn,TableName,'',TableType,2,1,2,0,Fields,@hTable)
> If result<>0
> ? 'It failed with result ' + STR(result )
> ENDIF
>
> AdsDisconnect( hConn )
>
>
> Mark Wilkins
> Advantage R&D
>
>
> "Wayne Yeung" <yeungmwayne@gmail.com> wrote in message
> news:4ee96a9b@solutions.advantagedatabase.com...
>> I'm new to Advantage. I'm not sure which to use, Advantage Client Engine
>> (ACE) or ODBC to access server data.
>> Which is faster? Can ACE return a VFP cursor?
>>
>> Can anyone provide some VFP sample code using ACE?
>>
>>
>> Thanks,
>> Wayne
>>