I have defined a VBA function inside a module like this:
Public Function MyFunction() As Integer
MyFunction = 2
End Function
In my Java program i have the follow:
....
String query = "SELECT * FROM MyTable WHERE ID = MyFunction()";
....
statement.execu te(query);
.....
It is an MS-ACCESS database. I get the following error:
"function MyFunction is not defined" any idea why?
is it not enough to define the function in modules and then reference it from Java program in sql statemente
Public Function MyFunction() As Integer
MyFunction = 2
End Function
In my Java program i have the follow:
....
String query = "SELECT * FROM MyTable WHERE ID = MyFunction()";
....
statement.execu te(query);
.....
It is an MS-ACCESS database. I get the following error:
"function MyFunction is not defined" any idea why?
is it not enough to define the function in modules and then reference it from Java program in sql statemente
Comment