Click here to Skip to main content
15,913,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generaldialog parent window pointer Pin
Irish_GUI22-Feb-04 3:10
Irish_GUI22-Feb-04 3:10 
GeneralRe: dialog parent window pointer Pin
J.B.22-Feb-04 3:42
J.B.22-Feb-04 3:42 
GeneralRe: dialog parent window pointer Pin
Irish_GUI22-Feb-04 4:22
Irish_GUI22-Feb-04 4:22 
GeneralRe: dialog parent window pointer Pin
Maximilien22-Feb-04 6:57
Maximilien22-Feb-04 6:57 
GeneralRe: dialog parent window pointer Pin
Ravi Bhavnani22-Feb-04 9:59
professionalRavi Bhavnani22-Feb-04 9:59 
QuestionWhat is the best way to retrive data Pin
sysmatrix22-Feb-04 2:46
sysmatrix22-Feb-04 2:46 
AnswerRe: What is the best way to retrive data Pin
Ravi Bhavnani22-Feb-04 10:00
professionalRavi Bhavnani22-Feb-04 10:00 
GeneralRetrieving date/time from Access DataBase Pin
pavneet21-Feb-04 23:50
pavneet21-Feb-04 23:50 
I am using ODBC 3.0 to connect to Microsoft Access Database, using ODBC functions like SQLFetch() and likes....
The data enters the database successfully but while retrieving date for no reasons Month and Year are going hayways....
the code being

	HSTMT		hstmt;<br />
	SQLRETURN	sr;<br />
	SQLCHAR	SQL[] = "SELECT DONumber, RelDate, Validity FROM DODetails";<br />
	char mess[500];<br />
	strcpy(mess,"Fetch:\n");<br />
	<br />
	sr = SQLAllocHandle(SQL_HANDLE_STMT, hDbConn, &hstmt);<br />
	if(sr != SQL_SUCCESS && sr != SQL_SUCCESS_WITH_INFO)<br />
		displayError(sr, "Error in Allocating Handle to Statement");<br />
<br />
	sr = SQLExecDirect(hstmt, SQL, SQL_NTS);<br />
	if(sr != SQL_SUCCESS && sr != SQL_SUCCESS_WITH_INFO)<br />
		displayError(sr, "Error in Executing the Statement");<br />
<br />
	// Bind Columns<br />
<br />
	sr = SQLBindCol(hstmt,1,SQL_C_TCHAR,<br />
		don.donum,sizeof(don.donum),&don.dolen);<br />
	if(sr != SQL_SUCCESS && sr != SQL_SUCCESS_WITH_INFO)<br />
			displayError(sr, "Error in Bind 1");<br />
<br />
	sr = SQLBindCol(hstmt,2,SQL_TYPE_DATE,<br />
			&don.reldate,sizeof(don.reldate),&don.relen);<br />
	if(sr != SQL_SUCCESS && sr != SQL_SUCCESS_WITH_INFO)<br />
		displayError(sr, "Error in Bind 2");<br />
<br />
	sr = SQLBindCol(hstmt,3,SQL_INTEGER,<br />
			&don.valid,sizeof(don.valid),&don.valen);<br />
	if(sr != SQL_SUCCESS && sr != SQL_SUCCESS_WITH_INFO)<br />
		displayError(sr, "Error in Bind 3");<br />
<br />
	<br />
	while(SQLFetch(hstmt) == SQL_SUCCESS)<br />
	{<br />
		sprintf(mess,"%s\tName : %s \tRel Date : %s \t Validity : %d\n",mess,don.donum,(LPCTSTR)don.reldate.Format("%d/%m/%Y"),don.valid);<br />
<br />
	}<br />
<br />
	MessageBox(mess);<br />
	SQLFreeHandle(SQL_HANDLE_STMT,hstmt);<br />

Also got some trouble using the CMonthCalCtrl...again the problem being the date turns out to be wrong everytime...
All help will be appreciated;)
Generaloutlook embedding Pin
emmatty21-Feb-04 23:13
emmatty21-Feb-04 23:13 
GeneralGDI+ problem: Image and Bitmap Pin
Arcrest21-Feb-04 20:42
Arcrest21-Feb-04 20:42 
Generalcaps lock Pin
Archer28221-Feb-04 20:03
Archer28221-Feb-04 20:03 
GeneralRe: caps lock Pin
Ravi Bhavnani22-Feb-04 10:02
professionalRavi Bhavnani22-Feb-04 10:02 
GeneralMemory Management in C++ Pin
Iceberg7621-Feb-04 18:44
Iceberg7621-Feb-04 18:44 
GeneralRe: Memory Management in C++ Pin
Arcrest21-Feb-04 21:00
Arcrest21-Feb-04 21:00 
GeneralRe: Memory Management in C++ Pin
Keith Vitali22-Feb-04 0:09
Keith Vitali22-Feb-04 0:09 
GeneralRe: Memory Management in C++ Pin
Gary R. Wheeler22-Feb-04 4:43
Gary R. Wheeler22-Feb-04 4:43 
GeneralRe: Memory Management in C++ Pin
Iceberg7622-Feb-04 8:19
Iceberg7622-Feb-04 8:19 
GeneralRe: Memory Management in C++ Pin
Gary R. Wheeler22-Feb-04 15:38
Gary R. Wheeler22-Feb-04 15:38 
Generalhelp with classes Pin
GdsFisher21-Feb-04 18:00
GdsFisher21-Feb-04 18:00 
GeneralRe: help with classes Pin
wb21-Feb-04 18:26
wb21-Feb-04 18:26 
GeneralRe: help with classes Pin
Iceberg7621-Feb-04 18:29
Iceberg7621-Feb-04 18:29 
GeneralRe: help with classes Pin
GdsFisher22-Feb-04 6:19
GdsFisher22-Feb-04 6:19 
GeneralStrings in C++ Pin
Iceberg7621-Feb-04 16:14
Iceberg7621-Feb-04 16:14 
GeneralRe: Strings in C++ Pin
Tim Smith21-Feb-04 17:11
Tim Smith21-Feb-04 17:11 
GeneralRe: Strings in C++ Pin
Iceberg7621-Feb-04 19:28
Iceberg7621-Feb-04 19:28 

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.