Click here to Skip to main content
15,915,065 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioninitializing a class derived from CDocument Pin
prithaa30-Nov-06 16:03
prithaa30-Nov-06 16:03 
QuestionHow to know when a document is done downloading Pin
Richard Andrew x6430-Nov-06 12:27
professionalRichard Andrew x6430-Nov-06 12:27 
AnswerRe: How to know when a document is done downloading Pin
Richard Andrew x6430-Nov-06 14:35
professionalRichard Andrew x6430-Nov-06 14:35 
QuestionPorting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Christopher Duncan30-Nov-06 11:36
Christopher Duncan30-Nov-06 11:36 
AnswerRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Mark Salsbery30-Nov-06 11:42
Mark Salsbery30-Nov-06 11:42 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Christopher Duncan30-Nov-06 11:54
Christopher Duncan30-Nov-06 11:54 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Mark Salsbery30-Nov-06 12:04
Mark Salsbery30-Nov-06 12:04 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Christopher Duncan30-Nov-06 12:40
Christopher Duncan30-Nov-06 12:40 
I used to do gigs hauling around a bunch of par cans, but these moving lights really up the bar on things. Of course, you just haven't lived until you've experienced a bug in your code while controlling a room full of these things. Quite exciting. Smile | :)

I took the quick & dirty approach and did a global replace of CDao to C, and that's getting me in the right direction. The two main obstacles I'm looking at presently are these.

First, I use CDaoRecordset::GetLastModifiedBookmark() all over town in the scenario where I'm adding a new record and then need to access the record I just added, e.g.

CWaitCursor ThinkWeBetterWaitTillTommorrow;<br />
try<br />
{<br />
	FormatTextAndName();<br />
// CDesignTimeEventSet derived from CDaoRecordset<br />
	CDesignTimeEventSet setDesignTimeEvent;<br />
	setDesignTimeEvent.Open();<br />
	setDesignTimeEvent.AddNew();<br />
	setDesignTimeEvent.m_lType = eImageEventPlayCd;<br />
	setDesignTimeEvent.m_strName = m_strName;<br />
	setDesignTimeEvent.m_strEventData = m_strEventData;<br />
	setDesignTimeEvent.Update();<br />
	setDesignTimeEvent.SetBookmark(setDesignTimeEvent.GetLastModifiedBookmark());<br />
	m_lDesignTimeId = setDesignTimeEvent.m_lId;<br />
	setDesignTimeEvent.Close();<br />
}<br />
catch(CException* pe)<br />
{<br />
	pe->ReportError();<br />
	pe->Delete();<br />
}


What's the preferred method of doing this when using CRecordset rather than CDaoRecordset (the former doesn't have this function)?

Secondly, I make significant use of CQueryDef to execute various query & non query operations, e.g.

CQueryDef defTruss(&g_dbCurrent);<br />
CString strQuery = "";<br />
strQuery.Format("DELETE * FROM PatternStep WHERE DesignTimePattern = %ld", m_lPatternId);<br />
defTruss.Create(NULL, strQuery);<br />
defTruss.Execute();<br />
defTruss.Close();


What class would you use in the CDatabase world?

Really appreciate the help, man.


GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Mark Salsbery30-Nov-06 13:10
Mark Salsbery30-Nov-06 13:10 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Christopher Duncan30-Nov-06 13:21
Christopher Duncan30-Nov-06 13:21 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Mark Salsbery30-Nov-06 13:39
Mark Salsbery30-Nov-06 13:39 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Christopher Duncan30-Nov-06 13:49
Christopher Duncan30-Nov-06 13:49 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Mark Salsbery30-Nov-06 14:04
Mark Salsbery30-Nov-06 14:04 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Christopher Duncan1-Dec-06 5:10
Christopher Duncan1-Dec-06 5:10 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Mark Salsbery1-Dec-06 6:25
Mark Salsbery1-Dec-06 6:25 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Christopher Duncan3-Dec-06 15:43
Christopher Duncan3-Dec-06 15:43 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Mark Salsbery3-Dec-06 16:37
Mark Salsbery3-Dec-06 16:37 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Christopher Duncan3-Dec-06 16:41
Christopher Duncan3-Dec-06 16:41 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Mark Salsbery3-Dec-06 16:46
Mark Salsbery3-Dec-06 16:46 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Christopher Duncan3-Dec-06 16:48
Christopher Duncan3-Dec-06 16:48 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Mark Salsbery3-Dec-06 17:04
Mark Salsbery3-Dec-06 17:04 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Christopher Duncan3-Dec-06 17:13
Christopher Duncan3-Dec-06 17:13 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Mark Salsbery3-Dec-06 17:31
Mark Salsbery3-Dec-06 17:31 
GeneralRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Christopher Duncan3-Dec-06 17:34
Christopher Duncan3-Dec-06 17:34 
AnswerRe: Porting VC++ 6.0 / DAO to VS2003 - what's the best non .NET db API? Pin
Stephen Hewitt30-Nov-06 11:57
Stephen Hewitt30-Nov-06 11:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.