Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ADOVC9.0
When I use SQL in VC++ to operate an Access tables, functions such as sin(), are OK!
 
The code:
 
"Update tablename set Result=POWER(2,2)" IS wrong!
DEBUG:
m_pszMsg 0x001774b0 "IDispatch error #3092"
m_strErrorDescription "Express 'power' Function undefined"
 
Is there anybody to tell me how can make the functions workable. Please.
(Sorry for my poor English!Again!)
You may check this site if you know Chinese.
 
http://topic.csdn.net/u/20091129/10/76911454-a507-4359-9def-09887e5d70f1.html[^]
Posted 28-Nov-09 23:44pm
lazydie282
Edited 1-Dec-09 5:58am
v4
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Have you tried:
UPDATE TableName SET Result = 2 ^ 2
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

So, what you really want to do is call VBA functions from MS Access queries? This page explains how to do that.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 7

I don't really follow you. If you want to use a VBA function in an Access query, just create your own UDF that wraps that VBA function, then you can use that UDF in your Access query. And if you want to use some Access query function from VC++, you can make database calls to an Access DB from VC++. Are you saying you want to use VC++ functions from an Access query? If so, I do not know if that can be done (although I imagine that too can be done by going through VBA as an intermediary).
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Thanks to "aspdotnetdev"
2^2 is OK.
But how about LN()?It still doesn't work.And other functions?
The core of my question is "How to use functions embeded(inner?) Access 2003 such as "POWER(),LN()",while using VC++ to operate Access DataBase?"
I have check some chinese sites,as if there is no method to solve it.In fact these functions are embeded in Access2003,one can use it by VBA.But HOW?
Thank you again!
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Thanks again!
I'ii read it carefully right now!
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

After having read for a long time,I don't know how to use VBA in my VC++ program!
Will you plea tell me how to do it?
Sorry for my much questions!
Thanks to "aspdotnetdev" Again. Big Grin | :-D
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

After "aspdotnetdev"'s telling.
I get to know that,there is no way for my original question.One must writes his own code to get the functions in VC++ after querying from access table the values of some fields.
Good Luck! "aspdotnetdev"!
yours sincerly.
  Permalink  
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 8

Finally,I find that the functions used while using VC++ to operate Access DataBase with ADO are the same in ASP.And all the elementary mathmatics functions can be used.
(For example:
power()->"^";ln()->"log()")
Thanks!!!
  Permalink  
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 9

Finally,I find that the functions used while using VC++ to operate Access DataBase with ADO are the same in ASP.And all the elementary mathmatics functions can be used.
(For example:
power()->"^";ln()->"log()")
Thanks!!!
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 808
1 OriginalGriff 493
2 sanket saxena 329
3 Tadit Dash 315
4 Peter Leow 228
0 Sergey Alexandrovich Kryukov 11,990
1 OriginalGriff 7,349
2 Peter Leow 5,003
3 Abhinav S 4,003
4 Maciej Los 3,575


Advertise | Privacy | Mobile
Web04 | 2.8.140421.2 | Last Updated 7 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid