Click here to Skip to main content
16,008,183 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionBitmap Deconstruction (AKA: How to get pixel values from a file) Pin
Michael Fritzius24-Jun-08 2:12
professionalMichael Fritzius24-Jun-08 2:12 
AnswerRe: Bitmap Deconstruction (AKA: How to get pixel values from a file) Pin
Nibu babu thomas24-Jun-08 2:20
Nibu babu thomas24-Jun-08 2:20 
AnswerRe: Bitmap Deconstruction (AKA: How to get pixel values from a file) Pin
SandipG 24-Jun-08 2:46
SandipG 24-Jun-08 2:46 
AnswerRe: Bitmap Deconstruction (AKA: How to get pixel values from a file) Pin
Hamid_RT25-Jun-08 23:37
Hamid_RT25-Jun-08 23:37 
QuestionCoInitialize/CoUninitialize Pin
George_George24-Jun-08 2:11
George_George24-Jun-08 2:11 
AnswerRe: CoInitialize/CoUninitialize Pin
Randor 24-Jun-08 3:32
professional Randor 24-Jun-08 3:32 
GeneralRe: CoInitialize/CoUninitialize Pin
George_George24-Jun-08 22:21
George_George24-Jun-08 22:21 
QuestionGetting problem with ADO database connection for Excel Pin
trinadh_t24-Jun-08 2:07
trinadh_t24-Jun-08 2:07 
Hi,

I am getting problem in retrieving tables from Excel 8.0. For some Excel files it is working fine. But some files it is giving dupicate fine names with garbage values.
like :
'Const#Liens-Book#Page$'
'Const#Liens-Book#Page$'_
'Const#Liens-Book#Page$'Z_1590EFBF_96D2_4D24_A4C9_842D6034FE78_#
'Const#Liens-Book#Page$'Z_3AFA2892_C4CC_49E4_9288_7102C55DF3DE_#
'Const#Liens-Book#Page$'Z_7609B60E_2B6C_4DBB_8D3C_4D38EC883EBD_#'Const"

It should retrieve 'Const#Liens-Book#Page$' only but its giving this many table names and giving error message like "object or provider is not capable of performing requested operation"

I have written code in VC++. Is there any seetings i need to do for excel file.

I am placing the code below :

CoInitialize(NULL);
ADO::_ConnectionPtr g_Connection;
g_Connection.CreateInstance( __uuidof(ADO::Connection) );

strConnection.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\test.xls;Extended Properties=Excel 8.0;");
g_Connection->Open( (LPCSTR)strConnection, "", "", ADO::adConnectUnspecified );

ADO::_RecordsetPtr recordset = g_Connection->OpenSchema( ADO::adSchemaTables );
CString strTableList;
while ( ! recordset->EndOfFile )
{
CString strTable = (LPCSTR)_bstr_t( recordset->Fields->GetItem( "TABLE_NAME" )->Value );
strTableList += strTable + "\n";
recordset->MoveNext();
}
AfxMessageBox( strTableList );
CString strColumnList;

recordset = g_Connection->OpenSchema( ADO::adSchemaColumns );
while ( ! recordset->EndOfFile )
{
CString strColumn = (LPCSTR)_bstr_t( recordset->Fields->GetItem( "COLUMN_NAME" )->Value );
strColumnList += strColumn;
recordset->MoveNext();
}
AfxMessageBox( strColumnList );

CoUninitialize();

Please help me for this issue. I am waiting for your reply.

Regards
Trinadh
Questionfinding os of a particular system Pin
VCProgrammer24-Jun-08 2:02
VCProgrammer24-Jun-08 2:02 
AnswerRe: finding os of a particular system Pin
Nibu babu thomas24-Jun-08 2:16
Nibu babu thomas24-Jun-08 2:16 
QuestionRe: finding os of a particular system Pin
CPallini24-Jun-08 2:22
mveCPallini24-Jun-08 2:22 
QuestionDoes any one have an idea about streaming RTP Pin
yaminisridaran24-Jun-08 0:21
yaminisridaran24-Jun-08 0:21 
QuestionRe: Does any one have an idea about streaming RTP Pin
Mark Salsbery24-Jun-08 4:51
Mark Salsbery24-Jun-08 4:51 
AnswerRe: Does any one have an idea about streaming RTP Pin
yaminisridaran24-Jun-08 18:33
yaminisridaran24-Jun-08 18:33 
QuestionWM_NEXTDLGCTL one control too far Pin
baerten24-Jun-08 0:05
baerten24-Jun-08 0:05 
AnswerRe: WM_NEXTDLGCTL one control too far [modified] Pin
_AnsHUMAN_ 24-Jun-08 0:08
_AnsHUMAN_ 24-Jun-08 0:08 
GeneralRe: WM_NEXTDLGCTL one control too far Pin
baerten24-Jun-08 0:15
baerten24-Jun-08 0:15 
QuestionRe: WM_NEXTDLGCTL one control too far Pin
Rajesh R Subramanian24-Jun-08 0:12
professionalRajesh R Subramanian24-Jun-08 0:12 
AnswerRe: WM_NEXTDLGCTL one control too far Pin
baerten24-Jun-08 0:20
baerten24-Jun-08 0:20 
GeneralRe: WM_NEXTDLGCTL one control too far Pin
Rajesh R Subramanian24-Jun-08 0:26
professionalRajesh R Subramanian24-Jun-08 0:26 
GeneralRe: WM_NEXTDLGCTL one control too far Pin
baerten24-Jun-08 0:54
baerten24-Jun-08 0:54 
GeneralRe: WM_NEXTDLGCTL one control too far Pin
Rajesh R Subramanian24-Jun-08 1:08
professionalRajesh R Subramanian24-Jun-08 1:08 
GeneralRe: WM_NEXTDLGCTL one control too far Pin
baerten24-Jun-08 1:23
baerten24-Jun-08 1:23 
AnswerRe: WM_NEXTDLGCTL one control too far Pin
Nibu babu thomas24-Jun-08 0:21
Nibu babu thomas24-Jun-08 0:21 
GeneralRe: WM_NEXTDLGCTL one control too far Pin
baerten24-Jun-08 0:50
baerten24-Jun-08 0:50 

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.