use Result of SQL Query like "ADODB.Recordset"

use Result of SQL Query like "ADODB.Recordset"

Postby Jimmy » Fri Jun 30, 2023 6:41 am

hi,

when using "ADODB.Connection" and "ADODB.Recordset" it is easy to "navigate" as "ADODB.Recordset" have Method for it

Question : what to use with ODBC or "native" :?:

"normal" i would say : fill Array with "Result" ... is there a "other" Way :idea:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: use Result of SQL Query like "ADODB.Recordset"

Postby nageswaragunupudi » Fri Jun 30, 2023 12:44 pm

Do you mean you want to connect using ODBC driver natively and not through ADO?
You can do it, though it is a thing of the past.
FWH provides
todbc.prg and todbcrdd.prg and more
You can also test TOdbcDirect class in tdbodbcd.prg
To be honest, I tested TOdbc class of FWH some decades back with Oracle and it worked well.
But soon I started using ADO and no going back.
You can try working with the ODBC classes provided by FWH
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: use Result of SQL Query like "ADODB.Recordset"

Postby Rick Lipkin » Fri Jun 30, 2023 1:32 pm

As Rao mentions ODBC is a thing of the past .. specifically, lets say I have a corporate SQL application that needs to run on 3000 machines .. that means that (someone ) has to physically go to each of those machines and make sure ODBC is loaded and configured properly .. ADO has no such limitations because oledb comes with every Microsoft operating system and there is no going to every desktop to configure anything ..

ADO is the way to connect to Oracle, SQL Server and to MS Access and more ..

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: use Result of SQL Query like "ADODB.Recordset"

Postby Jimmy » Fri Jun 30, 2023 9:20 pm

hi,

thx for Answer
i would use OLEDB ... if i get a "Driver" for it

but it "seems" it is not "free" for PostgreSQL any more

---

my "DualGRID" is not a "normal" App ... it should be like a "Swiss Knife" where you got a lot of Tools
it is not for User to "work" ... it is for Admin to get "quick Overview" and later "repair"

i want to learn how it work with Fivewin 64 Bit what i have made with Xbase++ and 32 Bit

---

it is a general Question how to handle BIG "Result" of SQL Query where NOT "LIMIT" is used
to "open" BIG Table (> 2.000.000) without "LIMIT" it can take Minutes even in PgAdmin

next is to "browse" and "navigate" ...
when using ADODB i got Method to "navigate" but how with ODBC :?:

for my "native" Solution i use Listview and a "Cursor" which is "LIMITed" to Size of "Browse"
so i use a lot of Ways but always try to find "other" Way which is "faster"
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: use Result of SQL Query like "ADODB.Recordset"

Postby nageswaragunupudi » Sat Jul 01, 2023 3:10 am

i would use OLEDB ... if i get a "Driver" for it
but it "seems" it is not "free" for PostgreSQL any more


Microsoft introduced ADO as an advancement over ODBC.
ADO is designed work both with ODBC drivers and OLEDB providers.
We need not have OLEDB provider to use ADO. We can use ADO with ODBC drivers also in a way better than using ODBC directly.

We need to prepare the connection string suitably.
For OLEDB providers, we start with "Provider=<OLEDB provider>;..."
For ODBC drivers, we start with "Provider=MSDASQL;{Driver=<ODBC driver>};..."

For instance, we always connect to MySql servers with ODBC drivers only with the above syntax:

Still if you want to use ODBC directly and not through ADO, FWH provides enough classes and they did work for me with Oracle longtime ago.

Note: I never tried 64 bit ODBC driver
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

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