Click here to Skip to main content
15,925,505 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: adding objects [modified] Pin
Maxwell Chen16-Jun-06 0:21
Maxwell Chen16-Jun-06 0:21 
GeneralRe: adding objects Pin
toxcct16-Jun-06 0:28
toxcct16-Jun-06 0:28 
QuestionCreateProcess + CreatePipe works partially Pin
nmx_de15-Jun-06 23:11
nmx_de15-Jun-06 23:11 
AnswerRe: CreateProcess + CreatePipe works partially Pin
David Crow16-Jun-06 2:54
David Crow16-Jun-06 2:54 
Questionusing variables in insert query for Access Pin
shuchigo_jane15-Jun-06 22:18
shuchigo_jane15-Jun-06 22:18 
AnswerRe: using variables in insert query for Access Pin
Cedric Moonen15-Jun-06 22:31
Cedric Moonen15-Jun-06 22:31 
GeneralRe: using variables in insert query for Access Pin
shuchigo_jane15-Jun-06 22:40
shuchigo_jane15-Jun-06 22:40 
GeneralRe: using variables in insert query for Access Pin
Cedric Moonen15-Jun-06 22:49
Cedric Moonen15-Jun-06 22:49 
Yes, concatenate. You have to make a difference between the DB instruction (or whatever you call it) and how it is represented. In your case, what you are doing is executing a SQL (I think) commands that is contained in a string. But the way you 'construct' the string can be done in whatever way you want.

Let's take a simple example: suppose you want to select something from a database (very simple example). The 'thing' you want to select is contained in a variable:

std::string ThingToSelect = "Name";

So, in fact, you want to execute a command that looks like: "SELECT Name from table" and your "Name" is in fact contained in a variable.

So, just construct your string this way:
std::string Command = "SELECT" + ThingToSelect + "from table";


And you get exactly the same.

See, it is simply string manipulation and has nothing to do with your database.


Cédric Moonen
Software developer

Charting control
GeneralRe: using variables in insert query for Access Pin
shuchigo_jane15-Jun-06 22:56
shuchigo_jane15-Jun-06 22:56 
GeneralRe: using variables in insert query for Access Pin
Cedric Moonen15-Jun-06 22:59
Cedric Moonen15-Jun-06 22:59 
GeneralRe: using variables in insert query for Access Pin
shuchigo_jane15-Jun-06 23:10
shuchigo_jane15-Jun-06 23:10 
GeneralRe: using variables in insert query for Access Pin
Cedric Moonen15-Jun-06 23:14
Cedric Moonen15-Jun-06 23:14 
GeneralRe: using variables in insert query for Access Pin
shuchigo_jane15-Jun-06 23:17
shuchigo_jane15-Jun-06 23:17 
GeneralRe: using variables in insert query for Access Pin
Cedric Moonen15-Jun-06 23:19
Cedric Moonen15-Jun-06 23:19 
GeneralRe: using variables in insert query for Access Pin
David Crow16-Jun-06 3:03
David Crow16-Jun-06 3:03 
AnswerRe: using variables in insert query for Access Pin
Viorel.15-Jun-06 22:58
Viorel.15-Jun-06 22:58 
AnswerRe: using variables in insert query for Access Pin
Milton Karimbekallil15-Jun-06 23:56
Milton Karimbekallil15-Jun-06 23:56 
GeneralRe: using variables in insert query for Access Pin
shuchigo_jane16-Jun-06 0:02
shuchigo_jane16-Jun-06 0:02 
GeneralRe: using variables in insert query for Access Pin
Viorel.16-Jun-06 1:38
Viorel.16-Jun-06 1:38 
QuestionFileHeader Pin
Rinu_Raj15-Jun-06 20:56
Rinu_Raj15-Jun-06 20:56 
QuestionRe: FileHeader Pin
Hamid_RT15-Jun-06 21:29
Hamid_RT15-Jun-06 21:29 
AnswerRe: FileHeader Pin
Sarath C15-Jun-06 21:35
Sarath C15-Jun-06 21:35 
AnswerRe: FileHeader Pin
kakan15-Jun-06 21:42
professionalkakan15-Jun-06 21:42 
QuestionCould someone help me with this? Pin
Syouki_kou15-Jun-06 20:54
Syouki_kou15-Jun-06 20:54 
AnswerRe: Could someone help me with this? Pin
kakan15-Jun-06 21:28
professionalkakan15-Jun-06 21:28 

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.