-
Help!!!
Can anyone tell me if it is possible to execute MS SQL stored procedures using VBScript written in Outlook forms?
I am attempting to use the string below to execute the stored procedure but this results in an "DAO.connection ODBC--Call Failed" error.
Set Rs = conDB.OpenRecordset("EXECUTE storedprocname", dbOpenSnapshot)
If I use the same string to execute a query in a replica MS Access database then it works fine. Its only when I connect to the SQL database. I know for sure that the connection isn't the problem because the string below works fine:
Set Rs = conDB.OpenRecordset("SELECT something FROM thedatabase", dbOpenSnapshot)
Its only a problem when trying to excute a MS SQL stored procedure by refering to its name.
If anyone can shed any light on this it would be hugely appreciated.
Thank you !!!!
Mike.
-
I would check the references in the project. Microsoft has new versions of the DLL that I had to download to get my SQL connection to work.
The project needs to reference "msado15.dll". My version was 1.5 but I needed 2.1 for it to work.