|
-
January 4th, 2005, 10:47 PM
#16
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
-
January 5th, 2005, 07:53 AM
#17
Re: Error in Recordset
 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.
-
January 5th, 2005, 10:11 AM
#18
Re: Error in Recordset
 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.
-
January 5th, 2005, 10:20 AM
#19
Re: Error in Recordset
 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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|