Click here to Skip to main content
15,905,967 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: dxf extraction in c Pin
tanatswa3330-Nov-11 12:00
tanatswa3330-Nov-11 12:00 
GeneralRe: dxf extraction in c Pin
Albert Holguin30-Nov-11 16:49
professionalAlbert Holguin30-Nov-11 16:49 
GeneralRe: dxf extraction in c Pin
enhzflep30-Nov-11 17:51
enhzflep30-Nov-11 17:51 
GeneralRe: dxf extraction in c Pin
Albert Holguin1-Dec-11 3:26
professionalAlbert Holguin1-Dec-11 3:26 
GeneralRe: dxf extraction in c Pin
Richard MacCutchan30-Nov-11 22:11
mveRichard MacCutchan30-Nov-11 22:11 
GeneralRe: dxf extraction in c Pin
Addy Tas1-Dec-11 8:38
Addy Tas1-Dec-11 8:38 
AnswerRe: dxf extraction in c Pin
Software_Developer30-Nov-11 23:16
Software_Developer30-Nov-11 23:16 
Questionc++ SQL Server Rowset Column Buffer Pin
jkirkerx30-Nov-11 9:02
professionaljkirkerx30-Nov-11 9:02 
This is my first time working with c++ and SQL Server.

Well I figured out how to connect to a SQL Server using the native 10.0 SQLCLI10. I can connect to the server, run my SQL Command and get back a rowset with columns now.

But for the life of me, some things are fuzzy. I now believe that all data returned are BYTES stored in a buffer pointer. So I run a small command to get back 1 row and 1 column, but I can't figure out how what to do with the BYTE response. I want to just get a WCHAR value, check it and be on my way.

C#
SELECT CASE WHEN db_id('NASE') IS NOT NULL THEN 'TRUE' ELSE 'FALSE' END

// add 3 bytes for precision, scale, and sign
buffer = new BYTE[ prgInfo[0].ulColumnSize + 3 ];
ULONG valbufferlen = ( ULONG ) prgInfo[0].ulColumnSize;
memset( buffer, 0, prgInfo[0].ulColumnSize + 3 );

hr = pIRowset->QueryInterface( IID_IAccessor, ( void ** ) &pIAccessor );
hr = pIAccessor->CreateAccessor( DBACCESSOR_ROWDATA, 1, DBBindings, prgInfo[0].ulColumnSize, &hAccessor, DBBindStatus );

while( DB_S_ENDOFROWSET != pIRowset->GetNextRows( NULL, 0, 1, &cRowsObtained, &prghRows ) ) {

     hr = pIRowset->GetData( rghRows, hAccessor, buffer );

     
     for ( ULONG i = 0, j = 0 ; i < valbufferlen ; i++, j+=2 ) {
       // Get my Data, Buffer says TRUE
     }

     pIRowset->ReleaseRows(1, prghRows, NULL, NULL, NULL);
}

AnswerRe: c++ SQL Server Rowset Column Buffer Pin
jkirkerx30-Nov-11 10:10
professionaljkirkerx30-Nov-11 10:10 
AnswerRe: c++ SQL Server Rowset Column Buffer Pin
Snorri Kristjansson1-Dec-11 2:30
professionalSnorri Kristjansson1-Dec-11 2:30 
GeneralRe: c++ SQL Server Rowset Column Buffer Pin
jkirkerx1-Dec-11 6:07
professionaljkirkerx1-Dec-11 6:07 
GeneralRe: c++ SQL Server Rowset Column Buffer Pin
Snorri Kristjansson2-Dec-11 0:01
professionalSnorri Kristjansson2-Dec-11 0:01 
GeneralRe: c++ SQL Server Rowset Column Buffer Pin
jkirkerx2-Dec-11 6:32
professionaljkirkerx2-Dec-11 6:32 
GeneralRe: c++ SQL Server Rowset Column Buffer Pin
JackDingler9-Dec-11 10:23
JackDingler9-Dec-11 10:23 
GeneralRe: c++ SQL Server Rowset Column Buffer Pin
jkirkerx9-Dec-11 11:00
professionaljkirkerx9-Dec-11 11:00 
GeneralRe: c++ SQL Server Rowset Column Buffer Pin
JackDingler9-Dec-11 13:08
JackDingler9-Dec-11 13:08 
GeneralRe: c++ SQL Server Rowset Column Buffer Pin
jkirkerx9-Dec-11 15:02
professionaljkirkerx9-Dec-11 15:02 
GeneralRe: c++ SQL Server Rowset Column Buffer Pin
jkirkerx9-Dec-11 16:48
professionaljkirkerx9-Dec-11 16:48 
QuestionUsing a member from the view class of an mfc program in a dialog box Pin
AndrewG123130-Nov-11 6:54
AndrewG123130-Nov-11 6:54 
AnswerRe: Using a member from the view class of an mfc program in a dialog box Pin
Jonathan Davies30-Nov-11 7:06
Jonathan Davies30-Nov-11 7:06 
GeneralRe: Using a member from the view class of an mfc program in a dialog box Pin
Albert Holguin30-Nov-11 7:30
professionalAlbert Holguin30-Nov-11 7:30 
GeneralRe: Using a member from the view class of an mfc program in a dialog box Pin
AndrewG123130-Nov-11 7:58
AndrewG123130-Nov-11 7:58 
GeneralRe: Using a member from the view class of an mfc program in a dialog box Pin
Albert Holguin30-Nov-11 8:24
professionalAlbert Holguin30-Nov-11 8:24 
GeneralRe: Using a member from the view class of an mfc program in a dialog box Pin
AndrewG123130-Nov-11 8:27
AndrewG123130-Nov-11 8:27 
GeneralRe: Using a member from the view class of an mfc program in a dialog box Pin
Albert Holguin30-Nov-11 8:28
professionalAlbert Holguin30-Nov-11 8: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.