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.

if I'm using VFP with OLEDB is necesary use the functions API's ?

2 posts in FoxPro Last posting was on 2007-09-27 17:21:27.0Z
Hugo Glez Posted on 2007-09-27 15:37:31.0Z
From: "Hugo Glez" <gomh7172@prodigy.net.mx>
Newsgroups: Advantage.FoxPro
Subject: if I'm using VFP with OLEDB is necesary use the functions API's ?
Date: Thu, 27 Sep 2007 10:37:31 -0500
Lines: 55
Organization: 3GM
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 189.165.50.70
Message-ID: <46fbccfb@solutions.advantagedatabase.com>
X-Trace: 27 Sep 2007 09:32:11 -0700, 189.165.50.70
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!189.165.50.70
Xref: solutions.advantagedatabase.com Advantage.FoxPro:238
Article PK: 1109592

Hi,

Just a question,

if I'm using VFP with OLEDB is necesary use the functions API's ?

I'm using VFP with OLEDB the next form:

lcCnx=CREATEOBJECT("ADODB.Connection")
lcCnx.connectionString = connectionString
lcCnx.OPEN()

prmRS=CREATEOBJECT("ADODB.RecordSet")
prmRS.LockType = 3 && Optimistic
prmRS.CursorLocation= 3 && adUseClient
prmRS.CursorType= 1 && adOpenKeyset *adOpenDynamic

Examples:
m.comando = "insert into paciente (p_id, p_name) values( '" + m.p_id +
"', '" + m.p_name + "' )"

if prmRS.state = 1
prmRS.close
endif
prmRS.OPEN(m.comando,lcCnx)


m.comando = "update paciente set p_status = " + STR(m.mu_minimo, 2) + " "
+ ;
"where p_id = '" + m.p_id + "' "

prmRS.OPEN(m.comando,lcCnx)


TEXT to lcComando noshow textmerge pretext 7
SELECT p_name, p_adress, p_phone, p_status
FROM paciente
ENDTEXT

lres = prmRS.OPEN(pcomando,lcCnx)

My Question. Is nesesary to use the next function's API's too?

guretval = AdsConnect(grutaadv, @ghconnapic)
luretval = AdsOpenTable(ghconnapic,gcfileadvctrl, "NULL", ;
ulRetVal = AdsLockRecord(gnhtablectrl,1)
ulRetVal = AdsSetField(gnhtablectrl, 'prog_cita',
strzero(lnprog_citanvo,6), 6)
ulRetVal = AdsWriteRecord(gnhtablectrl) && ESCRIBE LOS CAMBIOS!
ulRetVal = AdsUnLockRecord(gnhtablectrl,1) && DESBLOQUEA LA TABLA!

Thank's
Hugo Glez.


Mark Wilkins Posted on 2007-09-27 17:21:27.0Z
From: "Mark Wilkins" <mark@no.email>
Newsgroups: Advantage.FoxPro
References: <46fbccfb@solutions.advantagedatabase.com>
Subject: Re: if I'm using VFP with OLEDB is necesary use the functions API's ?
Date: Thu, 27 Sep 2007 11:21:27 -0600
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 10.24.38.228
Message-ID: <46fbe563@solutions.advantagedatabase.com>
X-Trace: 27 Sep 2007 11:16:19 -0700, 10.24.38.228
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.38.228
Xref: solutions.advantagedatabase.com Advantage.FoxPro:239
Article PK: 1109593

Hi,

It is not necessary to use the APIs. The SQL statements handle the record
locking and updates as needed. The only reason it might be necessary to use
the APIs is if there is some specialized functionality that is only
available through the API.

Mark Wilkins
Advantage R&D

"Hugo Glez" <gomh7172@prodigy.net.mx> wrote in message
news:46fbccfb@solutions.advantagedatabase.com...
> Hi,
>
> Just a question,
>
> if I'm using VFP with OLEDB is necesary use the functions API's ?
>