RE: Getting a text field using CDaoRecordset

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: XMarshall (XMarshall_at_discussions.microsoft.com)
Date: 02/07/05


Date: Mon, 7 Feb 2005 04:17:02 -0800

Insert some exception handling into your code..I guess you can use
CDaoException class for the same.

"Jaime Stuardo" wrote:

> Hi all...
>
> I am accessing an Access 2000 database using DAO. One problem I have is when
> I try to retrieve a text datafield.
>
> I'm using this:
> COleVariant varValue;
> pRsLoc->GetFieldValue(_T("LOC_NAME"), varValue);
>
> after that call varValue has "" (VT_BSTR). If I use GetSQL to get the
> query, and use that query in Microsoft Access 2000, the query shows
> correctly the values. I notice you that this problem is only with text
> fields. When I retrieve number fields it works.
>
> I use Visual C++ 6.0 with SP6
>
> Any help would be greatly appreciated.
>
> Thanks
> Jaime
>
>
>



Relevant Pages

  • Re: Internet class differences...
    ... The database and web interface to the server is produced by a different ... Initially a WebClient class was used. ... This worked fine for submitting the query. ... retrieve the results but, instead, is sent to a login page from which it ...
    (microsoft.public.dotnet.general)
  • Re: Drilltrough Question
    ... not query the underlying relational database, ... that in AS2000 drilllthrough queries retrieved data from the underlying ... I could retrieve any column from any table in the ...
    (microsoft.public.sqlserver.olap)
  • Re: How can I reduce the number of queries to my PostgreSQL database?
    ... SR> all books in the database, and all authors for each book. ... retrieve a list of all book_ids and book_titles. ... That's one query, if you're willing to make it advanced enough, ... although you need to make an aggregate to enable PostgreSQL to ...
    (comp.lang.python)
  • Re: Datetime within past week
    ... Prior to adding a new record to the database, I want to run a query to ... retrieve all of the records uploaded in the last 7 days. ...
    (comp.lang.php)
  • Re: Need help improving authorization
    ... >roles stored in the database. ... Currently, I retrieve the the ... >I think a more efficient approach would be to query the database only once ... >a delimied string and stored in cookie or a session variable. ...
    (microsoft.public.dotnet.framework.aspnet)