Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Passing string to SetCommandText Expand / Collapse
Author
Message
Posted Thursday, March 29, 2007 8:34 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, February 29, 2008 4:27 AM
Points: 9, Visits: 4

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.

Post #354778
Posted Wednesday, May 28, 2008 3:52 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, July 11, 2008 1:11 AM
Points: 10, Visits: 34
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
Post #507514
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse