best code for

Post Reply
User avatar
damianodec
Posts: 372
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia
Contact:

best code for

Post by damianodec »

hi,
I need a suggestion, what's the best solution for interactive ADODB I/O app ?
I'd like a app that by dialog manages data of SQL server:

Code: Select all

...
// connection
oCn := FW_OpenAdoConnection( ConnectString, .t.)

...
// HERE DIALOG...

cExecute := "INSERT INTO TABLE (CODE, DESC) VALUES (cCode, cDescr)"
    try
        oCn:Execute( cExecute)
        msginfo("insert ok")
    Catch
        msginfo("insert error")
    End Try 
...
 
is this (oCn:Execute) a good way ?
are there others ways for manage I/O data by ADO connection?

thanks
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
Posts: 372
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia
Contact:

Re: best code for

Post by damianodec »

hi Enrico, thank you,
what I'd like to know is if oCn:Execute is the best solution or are there other better FW_ function ?

thank you
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: best code for

Post by Enrico Maria Giordano »

Probably. But I prefer to not hide something (ADO) that already hides something else.

EMG
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: best code for

Post by nageswaragunupudi »

oCn:Execute is the best solution or are there other better FW_ function ?
oCn:Execute( cSql ) is the most suitable method to use here.
Regards

G. N. Rao.
Hyderabad, India
User avatar
damianodec
Posts: 372
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia
Contact:

Re: best code for

Post by damianodec »

thank you!
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Post Reply