Showing posts with label serser. Show all posts
Showing posts with label serser. Show all posts

Monday, March 12, 2012

ODBC + CRecordset

I'm using sql serser 2000, CRecordset, CDatabase, ODBC, VS.NET 03, VC++

How cat I get from my data base ntext or nvarchar value?

if I get varchar everything is ok, but not nvarchar..(or text field type).

I need help please with this.

maybe the solusion is to cast from ntext to text?

How can I casting this in my statment?

// activity as ntext (16)

SqlString = "SELECT activity FROM tasks WHERE status_id=1";

Yael.

What is the code which works for you in the case of varchar? And what doesn't work exactly with nvarchar?

Please provide an excerpt and perhaps we could find a solution.

Thanks,

ODBC + CRecordset

I'm using sql serser 2000, CRecordset, CDatabase, ODBC, VS.NET 03, VC++

How cat I get from my data base ntext or nvarchar value?

if I get varchar everything is ok, but not nvarchar..(or text field type).

I need help please with this.

maybe the solusion is to cast from ntext to text?

How can I casting this in my statment?

// activity as ntext (16)

SqlString = "SELECT activity FROM tasks WHERE status_id=1";

Yael.

What is the code which works for you in the case of varchar? And what doesn't work exactly with nvarchar?

Please provide an excerpt and perhaps we could find a solution.

Thanks,

ODBC + CDBVariant

Hi,

I'm using sql serser 2000, CRecordset, CDatabase, ODBC

How can I get ntext / nvarchar type field from my database?

maybe something like:

CDBVariant val;

rs.GetFieldValue("activity ",val);

CString activity = (*val.m_pstring).GetBuffer();

Thanks, Yael

I believe this is pretty much the same question as the post on http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1477058&SiteID=1

Did the response to that thread help you?

~Warren