![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
By the way, just to give more of an idea where I am at, below is one of my functions to read from the Db. Like I mentioned in my earlier post, I can read and write to the Db for typical data types. However, I need to read and write PDF files. I have set up a column for varbinary(max) but have not been successful in getting anything into it. |
|
I am not sure if it is customary in these newsgroups to edit the previous post in the reply. I notice that a lot of posters just leave the whole thing and let it grow. |
#4
| |||
| |||
|
|
By the way, just to give more of an idea where I am at, below is one of my functions to read from the Db. Like I mentioned in my earlier post, I can read and write to the Db for typical data types. However, I need to read and write PDF files. I have set up a column for varbinary(max) but have not been successful in getting anything into it. Thanks Jim note: I am not sure if it is customary in these newsgroups to edit the previous post in the reply. I notice that a lot of posters just leave the whole thing and let it grow. I am sure this is useful so you can just look at the most recent post and get the whole picture. Anyway, as I was posting another function, I deleted my previous post from the reply just to make it cleaner. -------------------------------------------------------------- Here is my example for my basic data reads: --------------------- _RecordsetPtr pRecordSet; PDEPT pData; _bstr_t bstrQuery("SELECT * FROM COOK.STATIC_DEPT"); _variant_t vRecsAffected(0L); try { pRecordSet = m_pConnection->Execute(bstrQuery, &vRecsAffected, adOptionUnspecified); if(!pRecordSet->GetadoEOF()) { _variant_t vFirstName; _variant_t vLastName; _variant_t vDeptNum; _variant_t vID; while(!pRecordSet->GetadoEOF()) { vFirstName = pRecordSet->GetCollect(L"dept_mgr_firstname"); vLastName = pRecordSet->GetCollect(L"dept_mgr_lastname"); vID = pRecordSet->GetCollect(L"dept_id"); vDeptNum = pRecordSet->GetCollect(L"dept_num"); pData = new DEPT; pData->NameF = vFirstName; pData->NameL = vLastName; pData->ID = vID; pData->DeptNum = vDeptNum; m_pPSheetRobot->m_PPage1->UpdateCtlDept(pData); pRecordSet->MoveNext(); } } pRecordSet->Close(); } catch( _com_error &e ) { ::CatchError(e); } |
![]() |
| Thread Tools | |
| Display Modes | |
| |