Can I know the precision and scale of a decimal field using ACEDAO?

Using ACEDAO in VC++, I am trying to retrieve the field details of an Access database (.accdb file) table of which one field is of decimal type. I am able to get the details using the functions of
DAO::_FieldPtr field;
as follows:
fieldName = field->GetName().GetBSTR();
nType = field->GetType() // returns DAO::dbDecimal
lSize = field->GetSize(); // returns 16
lAttr = field->GetAttributes(); // returns 0x000002H
nOrdinal = field->GetOrdinalPosition(); // returns 11
bAutoIncrement = ((lAttr & DAO::dbAutoIncrField) > 0);
DAO::PropertiesPtr props;
DAO::PropertyPtr prop;
int k, nProp;
std::wstring propName, propNames;
props = field->GetProperties();
if(props)
nProp = props->GetCount(); // returns 33
for(k = 0; k < nProp; k++)
prop = field->GetProperties()->GetItem((short) k);
if(prop)
propName = prop->GetName().GetBSTR();
propNames += propName;
propNames += L"\n";
// After exiting the loop, propNames contain 33 properties as:
// Value
// Attributes
// CollatingOrder
// Type
// Name
// OrdinalPosition
// Size
// SourceField
// SourceTable
// ValidateOnSet
// DataUpdatable
// ForeignName
// DefaultValue
// ValidationRule
// ValidationText
// Required
// AllowZeroLength
// AppendOnly
// Expression
// FieldSize
// OriginalValue
// VisibleValue
// GUID
// ColumnWidth
// ColumnOrder
// ColumnHidden
// Description
// DecimalPlaces
// DisplayControl
// TextAlign
// AggregateType
// ResultType
// CurrencyLCID
//But does not have any property named "Scale" or "Precision"
I could not find any function for retrieving the value for precision and scale for the decimal field.
Though I am able to retrieve the field value as a decimal number and get the required information from the structure, I think it is not the right way. Because, what will happen if the data for field is not available in the table?
Is there any other method to retrieve the precision and scale of a decimal type field using ACEDAO?
Thanks.

I cannot find a method or property in ACEDAO to retrieve the precision and scale of a field. Maybe you could try get the number of a decimal type and use some mathematical methods to get the precision.
I find there are some way to get the precision by ADO or OLEDB.
For ADO way, you could check this thread:
https://social.msdn.microsoft.com/Forums/office/en-US/883087ba-2c25-4571-bd3c-706061466a11/how-can-i-programmatically-access-scale-property-of-a-decimal-data-type-field?forum=accessdev
For OLE DB , you could use IColumnsInfo::GetColumnInfo to get DBCOLUMNINFO::bPrecision.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms722704(v=vs.85).aspx
Also people in C++ may not familiar with access development, the
Access for Developers forum is good place for access develop issue. You could try there.
Hope this helps some.
Shu
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Can we know the When and who delete the Library 1VK

    Dear all experts,
    When we try to T.Code S_ALR_87013611 in our production system.
    it shows error “Library 1VK doesn’t Exist.”
    But same working in quality and development system.
    So I would like to know  how ,who and when it delete.
    One more thing have any option for khow the who use this T code and when with range date. I already use ST03N. Can any body know which table having these type of information.
    Thanks in advance.
    Tapovardhan

    hi,
    i was wondering if you had a solution to your question? We had the same problem in our production system, that “Library 1VK doesn’t Exist.” We had to transport this library from assurance and then it was resolved. But how do i find out who deleted it and when? Please let me know if you have the answers to these. Thanks much!

  • How can i know the Authorization and Authentication in BusinessOne?

    Hi all,
        I want to know about the User Autherization and Authentication of a particular User. In which table or file this information is stored?
                 In CPRF Table i am getting only UI Related Authorization information. That is not clear too. 
            But i need particular users Authentication and Autherization information for each Object(SalesOrder, SalesInvoice,....).
    Thanks in advance,
    RAMU.

    I think this 2 posts will be helpfull:
    Regards,
    Ibai Peña
    PS: mixed the first link... I though it was a link to a thread where said same as Sebastien. Sorry.
    Message was edited by: Ibai Peña

  • How can I know the answer and reset the security questions!

    Hi,I want to buy some apps today.
    While I was ready to purchase , the store ask me to answer my security questions.
    But I had already forgot my answer !
    Now I can't purchase any app, help ! Thanks!

    You need to ask Apple to reset your security questions; this can be done by clicking here and picking a method, or if your country isn't listed, filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (108093)

  • How can i know the month and year when my ipod classic was manufactured ?

    assuming i only have its serial no.

    Hi Ralf,
    here's a complete example:
    DATA: last LIKE sy-datum, "ultimo of last month
          gjahr LIKE t001b-frye1,
          buper LIKE t001b-frpe1.
    last = sy-datum - sy-datum+6(2) .
    PERFORM check_period.
    IF sy-subrc <> 0.
      ADD 1 TO last . "-> next month
      PERFORM check_period.
      IF sy-subrc <> 0.
        MESSAGE a001(00) WITH 'no open fi period'.
      ENDIF.
    ENDIF.
    *formatting for germany
    CONCATENATE last+6(2) last+4(2) last(4) INTO bbkpf-budat.
    WRITE: / bbkpf-budat.
    FORM check_period.
      MOVE last(4) TO gjahr.
      MOVE last+4(2) TO buper.
      CALL FUNCTION 'FI_PERIOD_CHECK'
           EXPORTING
                i_bukrs          = bbkpf-bukrs
                i_gjahr          = gjahr
                i_koart          = '+'
                i_monat          = buper
           EXCEPTIONS
                error_period     = 1
                error_period_acc = 2
                OTHERS           = 3.
    ENDFORM.                    " check_period
    regards <a href="https://www.sdn.sap.com:443/irj/servlet/prt/porta
    l/prtroot/com.sap.sdn.businesscard.SDNBusinessCard?u=i
    Wo3ssHlIihvCrADIEGqaw%3D%3D">Andreas</a>
    Message was edited by: Andreas Mann

  • Can i Know the predefined class Which DoesThe same function As  of Describe

    Hi Abapers,
                            Can i Know the predefined class Which DoesThe same function As  of   Describe  Key Word.
    With Regards
    Bhaskar Rao

    I cannot find a method or property in ACEDAO to retrieve the precision and scale of a field. Maybe you could try get the number of a decimal type and use some mathematical methods to get the precision.
    I find there are some way to get the precision by ADO or OLEDB.
    For ADO way, you could check this thread:
    https://social.msdn.microsoft.com/Forums/office/en-US/883087ba-2c25-4571-bd3c-706061466a11/how-can-i-programmatically-access-scale-property-of-a-decimal-data-type-field?forum=accessdev
    For OLE DB , you could use IColumnsInfo::GetColumnInfo to get DBCOLUMNINFO::bPrecision.
    https://msdn.microsoft.com/en-us/library/windows/desktop/ms722704(v=vs.85).aspx
    Also people in C++ may not familiar with access development, the
    Access for Developers forum is good place for access develop issue. You could try there.
    Hope this helps some.
    Shu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • What is the point of Precision and Scale in Number Type?

    Version :11.2
    What is the point in having PRECISION and SCALE in number type? If you create the column with just NUMBER ie.without
    specifying precision or scale , you can enter numbers with any precision and scale.
    SQL> select * From v$version where rownum < 2;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    SQL> create table t1 (col1 number);
    Table created.
    SQL> insert into t1 values (223.9939394);
    1 row created.
    SQL> insert into t1 values (88.228384);
    1 row created.
    SQL> insert into t1 values (9.34);
    1 row created.
    SQL> insert into t1 values (000.00);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t1;
          COL1
    223.993939
    88.228384
          9.34
             0Did you ever have a business scenario where a Numerical column should store values only with a fixed precision and scale ?

    Omega3 wrote:
    Version :11.2
    What is the point in having PRECISION and SCALE in number type? If you create the column with just NUMBER ie.without
    specifying precision or scale , you can enter numbers with any precision and scale.
    SQL> select * From v$version where rownum < 2;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    SQL> create table t1 (col1 number);
    Table created.
    SQL> insert into t1 values (223.9939394);
    1 row created.
    SQL> insert into t1 values (88.228384);
    1 row created.
    SQL> insert into t1 values (9.34);
    1 row created.
    SQL> insert into t1 values (000.00);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t1;
    COL1
    223.993939
    88.228384
    9.34
    0Did you ever have a business scenario where a Numerical column should store values only with a fixed precision and scale ?Lots of business requirements for specific precisions and scales.
    A persons Age may required to be stored as whole numbers of no more than 3 digits.
    A sum of money may required to be stored with no more than 2 decimal places of accuracy e.g. GB Pounds and Pence or US Dollars and Cents
    A unit of length may required to be stored in metres with 2 decimal places for centimetres
    A shoe size may be required to be stored with one decimal place for half sizes
    etc.
    etc.
    Yes, you may just create all of them as generic NUMBER datatype, but creating them with precision and scale can provide additional information about the limitations expected for the values stored, especially for things like reporting tools that may use the specified precision and scale to determine how to display the values automatically (by default).
    If you start questioning "what's the point?" then you may as well say what's the point in having a NUMBER datatype when we can store numbers in a VARCHAR2 datatype? or what's the point in having a DATE datatype when we can stored dates as VARCHAR2 datatype? etc.
    No point in asking such a question because there's almost always a point to these things (and if there isn't they get deprecated in later versions).

  • How can I delete my Icloud account when I don't know the password and no longer have the email address associated with it?

    How can I delete my Icloud account when I don't know the password and no longer have the email address associated with it?
    You need your password to delete it and I need the email address to reset the password.  I feel like I'm going in circles!!!  Please help!!!

    Go to https//appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Tap edit next to the primary email account, tap Edit, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address (you shouldn't need to verify the old account).  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https//appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • HT2623 how do i delete icloud account on my ipad when my apple ID is non active email and i don't know the password and can't reset password without active email

    how do i delete icloud account on my ipad when my apple ID is non active email and i don't know the password and can't reset password without active email

    If the iCloud account you are trying to delete is old ID that was later updated to change it to your current ID, you can go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now, if desired, you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • When I set up my iPhone, I accidentally put in an apple ID that doesn't exist. Therefor, I don't know the password and can't delete my account from iCloud. Can anybody help?

    When I set up my iPhone, I accidentally put in an apple ID that doesn't exist. Therefor, I don't know the password and can't delete my account from iCloud. I was trying to sync my contacts to my iPad and now it's not possible without iCloud on my phone. Can anybody help?

    Have you tried changing the admin password in System Preferences > Users & Groups > Password   ??
    The Apple ID that is associated with your admin password is noted there.
    message edited by:  cs

  • My friend gave me her ipod about 2 years ago. neither of us know the passcode and now we have no way to link it to the original itunes account. is there a way i can reset it so i can use it?

    my friend gave me her ipod about 2 years ago. neither of us know the passcode and now we have no way to link it to the original itunes account. is there a way i can reset it so i can use it?
    I have tried plugging it in and holding the sleep/wake button and home button at same time and all it does is gives me the "slide to power off" option. Is there anything I can do??? Please Help!
    Message was edited by: Unordinary92

    Try DFU mode and then restore
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    Or try using this program to place the iPod in recovery mode
    RecBoot: Easy Way to Put iPhone into Recovery Mode
    - Next try the manual install method of:
    iDevice Troubleshooting 101 :: iPhone, iPad, iPod touch
    Place the iPod in recovery mode after the firmware download is complete and then restore using the instructions in the article. Sometimes recovery mode timeouts and returns to disabled before the firmware download is complete.
    - Then try on another computer

  • Can't get FaceTime to work...any suggestions...it just keeps me in this loop of asking to sign in, then verifying, then asking to sign in again. I know the username and password are correct.

    Can't get face time to work. Know the username and password are right. Asks me to sign in...verifying... And then goes back to sign in...

    One thing that worked for me:
    launched Message app which uses the same backend as Facetime. If it launches, click on the video. May display a Error Dialog. Call AppleCare and give them the number displayed. This will give them the needed info to check your AppleID account for the messaging servers
    For some reason FaceTime did not display this error, yet once I gave the Support person the number it was fixed in just a minute.
    YMMV

  • My ipad is disabled and says connect to itunes. I dont know the passcode and I dont have access to a computer , can I restore it without connecting to itunes

    My ipad is disabled, I dont know the passcode and I dont have a computer to connect to itunes... is there anyway of reactivating ipad without connecting to itunes?

    Sorry but no. You will need to get access to a computer with iTunes somewhere to restore the iPad. You can get help with this at an Apple Store if you have them in your area. Note that if you haven't backed up your iPad to iCloud, you'll lose all your data. Apps and other purchases from the iTunes Store can probably be re-downloaded.
    Regards.

  • Hello my iphone 3gs just been stolen how can i block the iphone and how could i track it i don't know for sure if i have find my iphone? please help i got many accounts on it and i don't have a passcode :((

    hello my iphone 3gs just been stolen how can i block the iphone and how could i track it i don't know for sure if i have find my iphone? please help i got many accounts on it and i don't have a passcode :((

    It was never free for the 3GS.
    It is if the initial sign-up is done on an iPhone 4, iPad or iPod touch 4th gen.
    From http://support.apple.com/kb/HT4436:
    After I sign up for Find My iPhone for free, can I use it on other iOS devices?
    Yes, if your devices are running iOS 4.2. For example, you can sign up for Find My iPhone for free on your iPad and use the same account information to sign in to MobileMe on your iPhone 3GS and turn on Find My iPhone.

  • When receiving an call waiting can't push the hold and answer button.Because: it will put on hold the first caller, answer to the second, but you can't hear the second until you end the first call !!! Anyone has the same problem ? Did anyone know why ?

    When receiving an call waiting can't push the hold and answer button.Because: it will put on hold the first caller, answer to the second, but you can't hear the second until you end the first call !!! Anyone has the same problem ? Did anyone know why ?

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

Maybe you are looking for

  • TV goes black when i change the channel?

    On my Toshiba LCD TV quite frequently (at least once a night) the screen will go black when I change the channel (via cable box) or if I change the input. I then have to turn the TV off then back on to get the picture back.

  • You guys helped me diagnose, now I'm hoping you can help me with the fix!

    I found out through the help of this forum that the hard drive in my original G5 iMac had failed. I ordered a new Serial ATA hard drive (Seagate Barracuda) and installed it without incident. The thermal sensor assembly (which I have read is a big iss

  • Removing the Vertical scroll bar from the content area.

    Hello, Is there a way to remove the vertical scroll bar from the content area? I am trying to create a new light portal frame work. Everything works fine except that I see two vertical scroll bars, one from the content area and another from the page(

  • ICal Server Invitations

    I'm thinking of adding the iCal service to an OS-X server I presently have running. I've set up the service and started prototyping and noticed that when an invitation is sent to someone outside the realm of users the server is aware of (like a Yahoo

  • Which wifi adaptor to choose for T410s?

    Hello, I am now ordering a new T410s and I don't know what the real (not on paper) difference is between these four choices: ThinkPad b/g/n Intel Centrino Advanced-N 6200 (2X2 AGN) [add $20.00] Intel Centrino Ultimate-N 6300 (3X3 AGN) [add $40.00] In