RE: CRecordset member variables

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Charles

How can I execute SQL statement directly from MFC (ODBC) application to
access sql server database (like I just want to display all the records of a
table in table form (SELECT * FROM Tablename) on click of a button).
In help it says to use ExecuteSql() function to execute SQL command
strings from CDatabase object. But my problem is that it creates CRecordset
object rateher than CDatabase object when we create an MFC application with
database support. And there is no ExecuteSql() member function in CRecordset
class.

"Manjree Garg" wrote:

Hi Charles

I appreciate all your suggestions.

Thanks

Manjree


"Charles Wang[MSFT]" wrote:

Hi Manjree,
Actually essentially DDX_FieldText() does support CStringW (unicode string)
since CString paramter can be either unicode or ASCII. The compiler will
make a decision if the current CString parameter is unicode.
I think that your concern is just that it does not provide an overload
function with CStringW parameter. This should be related to compatibility
issue with old programs since CStringW was introduced later since VC7.0.

Please feel free to let me know if you need further assistance on this
issue. Have a nice day!

Best regards,
Charles Wang
Microsoft Online Community Support
=====================================================
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications

If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.


Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
======================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================




.


Quantcast