Originally posted by R3SsH|n:
just trying my luck here...i have a sql statement and i can't get it to work...
_bstr_t word="haha";
_bstr_t strSQL("Insert into Grammar(Word) Values( ' " + word + " ' ) " ) ;

this wont work..
any idea what the correct statement for the insert statement?
Erm...
_bstr_t strSQL("Insert into Grammar(Word) Values(word) " ) ;
or
_bstr_t strSQL("Insert into Grammar(Word) Values(' ' +word);
can't? so far I know as long as this is a c++ platform, you can use any variable from there and put into sql statement. sql statement will find from your c script and convert automatically one..
for e.g. sql:
var word string = 'haha'
Insert into Grammar(Word) Values(word)
is the same as
Insert into Grammar(Word) Values('haha')
so if in c++ your word is a string value, you should be able to add in just like that.
