Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Invalid character value for cast specification"

Status
Not open for further replies.

AWEinCA

Programmer
Oct 18, 2000
35
US
This is the error I get when I try to assign a default SQL statement to my application:

"Invalid character value for cast specification"

This is what the function looked like before:

CString CAccountSet::GetDefaultSQL()
{
return _T("[dbo].
");
}

This is what the function looks like when I get the error:

CString CAccountSet::GetDefaultSQL()
{
CString Select;

Select = "SELECT FirstName\n"
"FROM table\n"
&quot;Where FirstName<>''\n&quot;
&quot;Order By LastName&quot;;
return _T(Select);
//return _T(&quot;[dbo].
&quot;);
}

I've tried

return Select;
return &quot;Select&quot;;
return _T(&quot;Select&quot;);

Can anyone shed some light on what my problem is?

Aaron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top