Click here to Skip to main content
15,909,539 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDCOM Tutorial Announcement Pin
Brian Hart9-Aug-00 14:43
Brian Hart9-Aug-00 14:43 
GeneralGetting the pointer to a CView from CMyApp Pin
David Wulff9-Aug-00 13:51
David Wulff9-Aug-00 13:51 
GeneralRe: Getting the pointer to a CView from CMyApp Pin
Brian Hart9-Aug-00 14:50
Brian Hart9-Aug-00 14:50 
GeneralRe: Getting the pointer to a CView from CMyApp Pin
David Wulff9-Aug-00 15:05
David Wulff9-Aug-00 15:05 
GeneralModify Windows Icons Pin
beka9-Aug-00 11:58
beka9-Aug-00 11:58 
GeneralSplitterWnd problem (Size of views !!!) Pin
Thomas Horak9-Aug-00 1:46
Thomas Horak9-Aug-00 1:46 
General****** Please HELP! File & SQL ****** Pin
Steve Lai9-Aug-00 1:00
Steve Lai9-Aug-00 1:00 
GeneralRe: ****** Please HELP! File & SQL ****** Pin
HP9-Aug-00 20:20
HP9-Aug-00 20:20 
Hi,

try this:

CString BuildSQL( const CString& sStringFromFile )
{
	CString sSQL, sTemp1, sTemp2;

	sSQL = _T("CREATE TABLE ");

	// string at position 0 is the table name
	if( AfxExtractSubString( sTemp1, sStringFromFile, 0, ',' ) )
	{
		sSQL += sTemp1;
		sSQL += "( ";

		// now add the column names and the column types
		for( int i = 1; ; i +=2 )
		{
			if( AfxExtractSubString( sTemp1, sStringFromFile, i, ',' ) &&
				AfxExtractSubString( sTemp2, sStringFromFile, i + 1, ',' ) )
			{
				sSQL += sTemp1;
				sSQL += sTemp2;
				sSQL += _T(", ");
			}
			else
			{
				break;
			}
		}

		// remove the last ", "
		sSQL.ReleaseBuffer( sSQL.GetLength() - 2 );
		sSQL += _T(" )");
	}

	return sSQL;
}


Regards
Holger Persch
GeneralCalling NT Service Pin
aasher8-Aug-00 18:54
aasher8-Aug-00 18:54 
GeneralRe: Calling NT Service Pin
HP9-Aug-00 0:08
HP9-Aug-00 0:08 
QuestionTransparent owner-drawn button? Pin
trey8-Aug-00 17:05
trey8-Aug-00 17:05 
AnswerRe: Transparent owner-drawn button? Pin
Paolo Messina8-Aug-00 21:29
professionalPaolo Messina8-Aug-00 21:29 
GeneralCatching a Keystroke Pin
sho98-Aug-00 15:16
sho98-Aug-00 15:16 
GeneralRe: Catching a Keystroke Pin
HP9-Aug-00 0:20
HP9-Aug-00 0:20 
Generaladding bitmaps to ctoolbar Pin
Shekhar8-Aug-00 10:38
Shekhar8-Aug-00 10:38 
GeneralSmall caption windows on Win2000 Pin
Paolo Messina8-Aug-00 7:00
professionalPaolo Messina8-Aug-00 7:00 
GeneralPrinting Bitmaps on a postscript printer Pin
Member 239698-Aug-00 4:59
Member 239698-Aug-00 4:59 
GeneralFinding out whether DHCP is enabled Pin
Paul Cole8-Aug-00 4:30
Paul Cole8-Aug-00 4:30 
GeneralUDP Packet Creation???? - H E L P ! ! ! Pin
daniel madden8-Aug-00 2:50
daniel madden8-Aug-00 2:50 
Generalanti-aliasing algorithm Pin
junsung kim8-Aug-00 1:47
sussjunsung kim8-Aug-00 1:47 
GeneralRe: anti-aliasing algorithm Pin
Philip Nicoletti9-Aug-00 4:04
Philip Nicoletti9-Aug-00 4:04 
Generalcom / c++ class realationships Pin
koteswara8-Aug-00 0:38
koteswara8-Aug-00 0:38 
GeneralRe: com / c++ class realationships Pin
Member 11278-Aug-00 2:43
Member 11278-Aug-00 2:43 
GeneralDisplay .TIF images Pin
Eldor@do8-Aug-00 0:29
Eldor@do8-Aug-00 0:29 
GeneralRe: Display .TIF images Pin
Philip Nicoletti8-Aug-00 9:27
Philip Nicoletti8-Aug-00 9:27 

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.