Passing string to SetCommandText

  • Hi all,

    Im using SQL CE 2.0, created the database and table succesasfully. I tried to insert the records using SetCommandText and Execute Commands

    pICmdText->SetCommandText(DBGUID_SQL, (LPWSTR)(L"INSERT INTO Employees VALUES (10, 'Bose')"));

    pICmdText->Execute(NULL, IID_NULL, NULL, NULL, NULL);

    This works fine then i tried some dynamic method

    pICmdText->SetCommandText(DBGUID_SQL, (LPWSTR)(insertionquery));

    pICmdText->Execute(NULL, IID_NULL, NULL, NULL, NULL);

    where i framed the insertionquery dynamically like "INSERT INTO Employees VALUES (11, 'Hussain')" and inserted but the function fails

    how could i achieve this kindly help me in this regard

    Thanks in Advance,

    Bose.

  • Hi

    I am developing windows mobile 6 application in vc++ using sql ce database. I have created database file with ext .sdf.I have created table and inserted data in it using Execut function.

    I am developing it on desktop using emulator. I am not getting my .sdf file on disk after creating database. can you tell me where it is storing

    hope u will reply

    thanx

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply