best code for

best code for

Postby damianodec » Tue Dec 17, 2019 8:39 pm

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  Expand view

...
// 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: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: best code for

Postby Enrico Maria Giordano » Tue Dec 17, 2019 10:41 pm

Yes, INSERT INTO is the best option.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8712
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: best code for

Postby damianodec » Wed Dec 18, 2019 7:19 am

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
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: best code for

Postby Enrico Maria Giordano » Wed Dec 18, 2019 9:13 am

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8712
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: best code for

Postby nageswaragunupudi » Wed Dec 18, 2019 7:07 pm

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
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: best code for

Postby damianodec » Thu Dec 19, 2019 7:45 am

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
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 79 guests