nesho
asked on
Call to an Oracle stored procedure from Access 97
Is it possible to call (execute) an Oracle stored procedure from Access 97?
If so, could you please explain the whole process..
If so, could you please explain the whole process..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This function will return the ORACLE System Date (in-built stored procedure)
As I have no idea what your function is doing I used this example. Replace 'SYSDATE' with your function.
For more indepth details - search Microsoft knowledge base, use keywords Pass-trough and Oracle.
Function GetOracleDate () as String
Dim MyDB As Database
Dim MyQuery As QueryDef
Dim MySet as RecordSet
Dim SourceConnectString As String
Dim strSQL As String
Set MyDB = CurrentDB()
'Create a temporary query in memory only
Set MyQuery = MyDB.CreateQueryDef ("")
strSQL = "SELECT SYSDATE FROM DUAL"
SourceConnectString = "ODBC;"
MyQuery.Connect = SourceConnectString
MyQuery.ReturnsRecords = True
MyQuery.SQL = strSQL
'Open the Recordset to return the Date
Set MySet = MyQuery.OpenRecordSet()
'Return the system date
GetOracleDate = MySet!SYSDATE
End function
As I have no idea what your function is doing I used this example. Replace 'SYSDATE' with your function.
For more indepth details - search Microsoft knowledge base, use keywords Pass-trough and Oracle.
Function GetOracleDate () as String
Dim MyDB As Database
Dim MyQuery As QueryDef
Dim MySet as RecordSet
Dim SourceConnectString As String
Dim strSQL As String
Set MyDB = CurrentDB()
'Create a temporary query in memory only
Set MyQuery = MyDB.CreateQueryDef ("")
strSQL = "SELECT SYSDATE FROM DUAL"
SourceConnectString = "ODBC;"
MyQuery.Connect = SourceConnectString
MyQuery.ReturnsRecords = True
MyQuery.SQL = strSQL
'Open the Recordset to return the Date
Set MySet = MyQuery.OpenRecordSet()
'Return the system date
GetOracleDate = MySet!SYSDATE
End function
ASKER
Have you ever got it working with your own function instead of built-in and how about using parameters with function?
Anything special I should do in case I want to pass a parameter to my function?
Anything special I should do in case I want to pass a parameter to my function?
ASKER
Thanks!