Trouble with CommandText string concatenation
- From: "Jim" <guitarz6@xxxxxxxxx>
- Date: 5 May 2006 18:34:08 -0700
Hi everyone,
I'm trying to assign a command to an OleDbCommand object and
concatenate a string parameter without much success. Here's a basic
idea of what I'm trying to do for my school project against an Access
db.
string sCmd;
OleDbCommand * cmd = new OleDbCommand();
sCmd = "INSERT INTO Books (Title) VALUES (' " + dbFile.Title;
//dbFile.Title is also a string
cmd->CommandText = sCmd;
I then get the following error:
error C2664: 'System::Data::OleDb::OleDbCommand::set_CommandText' :
cannot convert parameter 1 from 'std::string' to 'System::String __gc
*'
Any help would be greatly appreciated.
Thanks!
.
- Prev by Date: Splitter windows and print/print preview command handlers
- Next by Date: Re: dll linkage
- Previous by thread: Splitter windows and print/print preview command handlers
- Next by thread: Re: OnDraw() not called in derivative of CEditView (MDI documents)
- Index(es):
Relevant Pages
|
|