on 11-19-2012 12:01 PM
I would like to call a procedure from MS-Access. Does anyone have an easy way to do this?
Thanks
Why would you want to call a HANA procedure from Access? I suggest that you use a calculation view to do your logic and use your calculation view instead.
Please expand on what you are trying to do.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Because I need to obtain a large amount of data that I want to move to Access, I have created a Calc View that creates exactly what I want, then a Procedure which will dump that View into a HANA user table, which I can then connect to from Access (since Access can't use Views - only Tables). So I want to call the procedure from Access, so I get a fresh user table to pull into Access. This helps me avoid a 2 step (1) go to HANA Studio to run the procedure (2) back to Access to pull the refreshed table.
Ok. Finally figured this out. Spent many hours struggling with this - since I am not really a VB expert. But in case others are interested. Does not look so compicated once you know how.
-------------------------------------------------
Sub RunStoreProc()
Dim wrkMain As Workspace
Dim dbsHANA As Database
Set wrkMain = CreateWorkspace("", "admin", "", dbUseJet)
Set dbsHANA = wrkMain.OpenDatabase("", dbDriverNoPrompt, False, "ODBC;DSN=SAPHANAPR1")
dbsHANA.Execute "CALL PR_TEST('')", dbSQLPassThrough
dbsHANA.Close
wrkMain.Close
End Sub
-------------------------------------------------
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.