CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Join Date
    May 2002
    Location
    Mumbai
    Posts
    197

    Re: Error in Recordset

    Thanks every one.
    I have solved the problem, It was my first program out of C++, I mean involving MFC, etc
    I really appreciate evey one involved in helping me, esp Amarcode.
    Thanks a lot again.
    Regards
    Sunnypriya

  2. #17
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,637

    Re: Error in Recordset

    Quote Originally Posted by amarcode
    It's not true. The CRecordset class doesn't do it for you. You have to specify the select statement in the recordset open function.
    Dude, I've been working with CRecordsets for 10 years. You don't need to specify a select statement. I have NEVER specified a select statement. If you need to, then you are doing something wrong.

  3. #18
    Join Date
    Jun 2004
    Location
    Chicago, United States
    Posts
    88

    Re: Error in Recordset

    Quote Originally Posted by GCDEF
    Dude, I've been working with CRecordsets for 10 years. You don't need to specify a select statement. I have NEVER specified a select statement. If you need to, then you are doing something wrong.
    You can pass NULL parameter to the CRecordset Open function. In this case the default SQL statement is used, but you have to specify this statement in derived from CRecordset class function GetDefaultSQL().
    Last edited by amarcode; January 5th, 2005 at 01:33 PM.
    A.M.
    My Latest Articles:
    CCustomBitmapButton - An owner-draw button and a frame for the caption bar, in one class.
    CCustomTabCtrl - A clone of the Excel tab sheet control.

  4. #19
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,637

    Re: Error in Recordset

    Quote Originally Posted by amarcode
    Moron, you can pass NULL parameter to the CRecordset Open function. In this case the default SQL statement is used, but you have to specify this statement in derived from CRecordset class function GetDefaultSQL().
    Which is it? First you say that you have to pass a select statement to the Open function then you say it can be NULL. And you call me a moron - sheesh.

    If you use class wizard to create your CRecordset derived class, you don't need to write any select code yourself. GetDefaultSQL should return a table name, not a complete select statement. CRecordset builds the select statement for you using the table name that class wizard inserts in your coce. You don't even need to create a CDatabase object.

    If you're going to give advice and go around calling people names, you should have some clue what you're talking about.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured