How to read a field value DAO (Access) 
Author Message
 How to read a field value DAO (Access)

Im trying to get a double field value, I use
GetFieldValue but it get on a OleVariant variable, I
dont know how to get the double or string value from it,
in order to put in a Edit or text dialog.3
Is there any better way to get field values from an
access97 table.
I dont want to use DDX procedure to get those values.

Thanks in advance for your help,



Mon, 26 Apr 2004 08:21:55 GMT  
 How to read a field value DAO (Access)
Eduardo,

If your are using GetFieldValue, then you are well over half way to having
your problem solved.

Once you have the data (in a COleVariant), you can coerce the type as per
your design requirements using the ChangeType method.

Consider the following:

COleVariant varValue;
GetFieldValue(pos,varValue);
varValue(ChangeType(VT_R8,NULL);
double dblVal = varValue.dblVal;

i hope this helps.

regards
roy fine


Im trying to get a double field value, I use
GetFieldValue but it get on a OleVariant variable, I
dont know how to get the double or string value from it,
in order to put in a Edit or text dialog.3
Is there any better way to get field values from an
access97 table.
I dont want to use DDX procedure to get those values.

Thanks in advance for your help,



Mon, 26 Apr 2004 10:14:03 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DAO: Setting OLE Object Field Value in Access DB

2. Can not read contents of field with the DAO SDK (Not MFC DAO)

3. How to get the value of a counter (AutoIncrement) field using MFC DAO classes

4. howto: getting field value with DAO classes

5. howto: getting field value with DAO classes

6. How to get the value of a counter (AutoIncrement) field using MFC DAO classes

7. Reading and Writing to an OLE Object Field useing DAO

8. Reading and Writing to an OLE Object Field useing DAO

9. How to access excel fields using DAO connection (newbie question)

10. DAO, Access, and null fields

11. cannot read long varchar field values from ADO Recordsets

12. Using CHTMLView and accessing values of fields in a html form

 

 
Powered by phpBB® Forum Software