sydneyguy
asked on
c++ using a LPCOLESTR * and adding a string varaible to the Pointer
this is what i have now its hard coded to the line and works just fine
// LPCOLESTR query = L"SELECT * from bothtaables;";
what i want to do is to pass to it from another function and pass the SQL statement that i require
but still want to us the LPCOLESTR
string accessMSdbChange::ExtractD ataDB(stri ng SQLstr)
{
have tried
LPCOLESTR query = L + SQLstr;
LPCOLESTR query = L( SQLstr); this throws up a error C3861: 'L': identifier not found, even with argument-dependent lookup
}
this should h=give you some idea of the syntax that i am looking for
any help would be appreciated
aqm using vs2003
// LPCOLESTR query = L"SELECT * from bothtaables;";
what i want to do is to pass to it from another function and pass the SQL statement that i require
but still want to us the LPCOLESTR
string accessMSdbChange::ExtractD
{
have tried
LPCOLESTR query = L + SQLstr;
LPCOLESTR query = L( SQLstr); this throws up a error C3861: 'L': identifier not found, even with argument-dependent lookup
}
this should h=give you some idea of the syntax that i am looking for
any help would be appreciated
aqm using vs2003
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i have been going through the tutorials to figure out once and for all the differnces and how to convert and start from th ebeginning to use the right types ended up getting it going with
BSTR b = SQLstr.AllocSysString();
LPOLESTR strFxn = b;
LPCOLESTR query = strFxn;
now just have to understnd why and how it all hangs together
so thaks for you help again
b