SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Passing string to SetCommandText


Passing string to SetCommandText

Author
Message
Lillian Bose
Lillian Bose
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 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.


k.subodh1
k.subodh1
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search