Hello!
My problem is:
In Sql Server I made a table "Nir" with 3 columns:
Nr_crt - numeric
Val_TVA - numeric
Val_Tot - numeric
In SQL Server the command:
SELECT SUM(Val_TVA) AS Val_TVA, SUM(Val_Tot) AS Val_Tot FROM Nir - returned
me a result with 2 sums... OK!
My question is:
In Visual C++ - MFC I don't know how can to execute this command and to get
the result return by this comand (may be with a VARIANT - pvRecord I don't
know)
How to access the result return by this command''
I use CDatabase and CRecordset.
Thank You very much!Create a CRecordset, then execute the SQL statement on it. Then you have
can use GetFieldValue on the recordset grab the results in CDBVariants.
"Florin" <Florin@.discussions.microsoft.com> wrote in message
news:382C3711-E222-4173-BF8A-81EBD7E3508A@.microsoft.com...
> Hello!
> My problem is:
> In Sql Server I made a table "Nir" with 3 columns:
> Nr_crt - numeric
> Val_TVA - numeric
> Val_Tot - numeric
>
> In SQL Server the command:
> SELECT SUM(Val_TVA) AS Val_TVA, SUM(Val_Tot) AS Val_Tot FROM Nir -
> returned
> me a result with 2 sums... OK!
>
> My question is:
> In Visual C++ - MFC I don't know how can to execute this command and to
> get
> the result return by this comand (may be with a VARIANT - pvRecord I don't
> know)
> How to access the result return by this command''
> I use CDatabase and CRecordset.
>
> Thank You very much!
>
>
Showing posts with label numericin. Show all posts
Showing posts with label numericin. Show all posts
Monday, March 12, 2012
ODBC - SQL Server 200 - MFC - Visual C++.NET (2003)
Hello!
My problem is:
In Sql Server I made a table "Nir" with 3 columns:
Nr_crt - numeric
Val_TVA - numeric
Val_Tot - numeric
In SQL Server the command:
SELECT SUM(Val_TVA) AS Val_TVA, SUM(Val_Tot) AS Val_Tot FROM Nir - returned
me a result with 2 sums... OK!
My question is:
In Visual C++ - MFC I don't know how can to execute this command and to get
the result return by this comand (may be with a VARIANT - pvRecord I don't
know)
How to access the result return by this command??
I use CDatabase and CRecordset.
Thank You very much!
Create a CRecordset, then execute the SQL statement on it. Then you have
can use GetFieldValue on the recordset grab the results in CDBVariants.
"Florin" <Florin@.discussions.microsoft.com> wrote in message
news:382C3711-E222-4173-BF8A-81EBD7E3508A@.microsoft.com...
> Hello!
> My problem is:
> In Sql Server I made a table "Nir" with 3 columns:
> Nr_crt - numeric
> Val_TVA - numeric
> Val_Tot - numeric
>
> In SQL Server the command:
> SELECT SUM(Val_TVA) AS Val_TVA, SUM(Val_Tot) AS Val_Tot FROM Nir -
> returned
> me a result with 2 sums... OK!
>
> My question is:
> In Visual C++ - MFC I don't know how can to execute this command and to
> get
> the result return by this comand (may be with a VARIANT - pvRecord I don't
> know)
> How to access the result return by this command??
> I use CDatabase and CRecordset.
>
> Thank You very much!
>
>
My problem is:
In Sql Server I made a table "Nir" with 3 columns:
Nr_crt - numeric
Val_TVA - numeric
Val_Tot - numeric
In SQL Server the command:
SELECT SUM(Val_TVA) AS Val_TVA, SUM(Val_Tot) AS Val_Tot FROM Nir - returned
me a result with 2 sums... OK!
My question is:
In Visual C++ - MFC I don't know how can to execute this command and to get
the result return by this comand (may be with a VARIANT - pvRecord I don't
know)
How to access the result return by this command??
I use CDatabase and CRecordset.
Thank You very much!
Create a CRecordset, then execute the SQL statement on it. Then you have
can use GetFieldValue on the recordset grab the results in CDBVariants.
"Florin" <Florin@.discussions.microsoft.com> wrote in message
news:382C3711-E222-4173-BF8A-81EBD7E3508A@.microsoft.com...
> Hello!
> My problem is:
> In Sql Server I made a table "Nir" with 3 columns:
> Nr_crt - numeric
> Val_TVA - numeric
> Val_Tot - numeric
>
> In SQL Server the command:
> SELECT SUM(Val_TVA) AS Val_TVA, SUM(Val_Tot) AS Val_Tot FROM Nir -
> returned
> me a result with 2 sums... OK!
>
> My question is:
> In Visual C++ - MFC I don't know how can to execute this command and to
> get
> the result return by this comand (may be with a VARIANT - pvRecord I don't
> know)
> How to access the result return by this command??
> I use CDatabase and CRecordset.
>
> Thank You very much!
>
>
Subscribe to:
Posts (Atom)