Click here to Skip to main content
15,892,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to change structure data written in the file. in v++ Pin
ashish8patil26-Jun-09 4:07
ashish8patil26-Jun-09 4:07 
Questionhow to open rtf file Pin
santhosh-padamatinti26-Jun-09 1:30
santhosh-padamatinti26-Jun-09 1:30 
AnswerRe: how to open rtf file Pin
Rajesh R Subramanian26-Jun-09 1:35
professionalRajesh R Subramanian26-Jun-09 1:35 
QuestionGettin the pointers of all open windows Pin
prithaa26-Jun-09 1:11
prithaa26-Jun-09 1:11 
QuestionRe: Gettin the pointers of all open windows Pin
Rajesh R Subramanian26-Jun-09 1:12
professionalRajesh R Subramanian26-Jun-09 1:12 
AnswerRe: Gettin the pointers of all open windows Pin
prithaa26-Jun-09 1:17
prithaa26-Jun-09 1:17 
GeneralRe: Gettin the pointers of all open windows Pin
Rajesh R Subramanian26-Jun-09 1:34
professionalRajesh R Subramanian26-Jun-09 1:34 
QuestionMicrosoft Excel Driver(*.xls, *.xlsx, *.xlsm,*.xlsb) Pin
Davitor25-Jun-09 23:26
Davitor25-Jun-09 23:26 
Hi All

I am useing Microsoft Excel Driver for creating a database (i.e. Excel sheet).it's working only for .xls formate.But it's not create for .xlsx formate.Code is here

GetDlgItemText(IDC_EDIT1,m_getfilename);
	CDatabase database;
 //getfilename(get filepath and name run time)
 CString sDriver="Microsoft Excel Driver(*.xls, *.xlsx, *.xlsm,*.xlsb)"; //DRIVER=
  CString sExcelFile = m_getfilename;                // Filename and path for the file to be created

  CString sSql;
    
  TRY
  {
    // Build the creation string for access without DSN
       
    sSql.Format("DRIVER={%s};DSN='';FIRSTROWHASNAMES=1;READONLY=FALSE;CREATE_DB=\"%s\";DBQ=%s",
                sDriver, sExcelFile, sExcelFile);


	 

	
    // Create the database (i.e. Excel sheet)
    if( database.OpenEx(sSql,CDatabase::noOdbcDialog) )
    {
      // Create table structure
		
      sSql = "CREATE TABLE demo (Name TEXT,Age NUMBER)";
      database.ExecuteSQL(sSql);

      // Insert data
      sSql = "INSERT INTO demo (Name,Age) VALUES ('Bruno Brutalinsky',45)";
      database.ExecuteSQL(sSql);

      sSql = "INSERT INTO demo (Name,Age) VALUES ('Fritz Pappenheimer',30)";
      database.ExecuteSQL(sSql);

      sSql = "INSERT INTO demo (Name,Age) VALUES ('Hella Wahnsinn',28)";
      database.ExecuteSQL(sSql);
	  sSql = "INSERT INTO demo (Name,Age) VALUES ('Bruno Brutalinsky',45)";
      database.ExecuteSQL(sSql);

      sSql = "INSERT INTO demo (Name,Age) VALUES ('Fritz Pappenheimer',30)";
      database.ExecuteSQL(sSql);

      sSql = "INSERT INTO demo (Name,Age) VALUES ('Hella Wahnsinn',28)";
      database.ExecuteSQL(sSql);

	  sSql = "INSERT INTO demo (Name,Age) VALUES ('Bruno Brutalinsky',45)";
      database.ExecuteSQL(sSql);

      sSql = "INSERT INTO demo (Name,Age) VALUES ('Fritz Pappenheimer',30)";
      database.ExecuteSQL(sSql);



    }      

    // Close database
    database.Close();

  }
  CATCH_ALL(e)
  {
    TRACE1("Driver not installed: %s",sDriver);
  }
  END_CATCH_ALL;


plz help me
QuestionRe: Microsoft Excel Driver(*.xls, *.xlsx, *.xlsm,*.xlsb) Pin
David Crow26-Jun-09 4:01
David Crow26-Jun-09 4:01 
AnswerRe: Microsoft Excel Driver(*.xls, *.xlsx, *.xlsm,*.xlsb) Pin
Davitor26-Jun-09 18:19
Davitor26-Jun-09 18:19 
Question[Message Deleted] Pin
Rakesh525-Jun-09 23:13
Rakesh525-Jun-09 23:13 
AnswerRe: upload unicode big endian file in vc++ Pin
Rajesh R Subramanian25-Jun-09 23:19
professionalRajesh R Subramanian25-Jun-09 23:19 
General[Message Deleted] Pin
Rakesh525-Jun-09 23:23
Rakesh525-Jun-09 23:23 
GeneralRe: upload unicode big endian file in vc++ PinPopular
Rajesh R Subramanian25-Jun-09 23:30
professionalRajesh R Subramanian25-Jun-09 23:30 
JokeRe: upload unicode big endian file in vc++ Pin
Cedric Moonen25-Jun-09 23:30
Cedric Moonen25-Jun-09 23:30 
GeneralRe: upload unicode big endian file in vc++ Pin
Rajesh R Subramanian25-Jun-09 23:42
professionalRajesh R Subramanian25-Jun-09 23:42 
GeneralRe: upload unicode big endian file in vc++ Pin
Cedric Moonen25-Jun-09 23:46
Cedric Moonen25-Jun-09 23:46 
GeneralRe: upload unicode big endian file in vc++ Pin
Rajesh R Subramanian25-Jun-09 23:50
professionalRajesh R Subramanian25-Jun-09 23:50 
GeneralRe: upload unicode big endian file in vc++ Pin
CPallini25-Jun-09 23:35
mveCPallini25-Jun-09 23:35 
AnswerRe: [Message Deleted] Pin
Rajesh R Subramanian26-Jun-09 1:08
professionalRajesh R Subramanian26-Jun-09 1:08 
QuestionTextbox -> invisible Mouse Cursor Pin
baerten25-Jun-09 23:13
baerten25-Jun-09 23:13 
AnswerRe: Textbox -> invisible Mouse Cursor Pin
PJ Arends26-Jun-09 5:17
professionalPJ Arends26-Jun-09 5:17 
GeneralRe: Textbox -> invisible Mouse Cursor Pin
baerten29-Jun-09 22:38
baerten29-Jun-09 22:38 
GeneralRe: Textbox -> invisible Mouse Cursor Pin
PJ Arends30-Jun-09 6:23
professionalPJ Arends30-Jun-09 6:23 
QuestionXMLHTTP Wrong Response Pin
Ash_VCPP25-Jun-09 22:50
Ash_VCPP25-Jun-09 22: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.