Probably a Long shot but worth a try.

Does anyone use SAS Intergrated Object Manager (SAS IOM) with Access 2000 on Windows 2000?

I have an Access 97 database that I am converting to 2000, the 97 version uses a reference to SAS IOM which allows MS Access to manipulate SAS Datasets in a workspace, creating a real time manipulation of SAS via ADODB.

I have converted this to Access 2000 but now I am receiving an error

"Run-Time Error '-2147217407 (80041001)'

ERROR: The requested function was not performed due to an invalid or expired product license."

This happens at the end of the following code.

Code:
Dim TableNames$(1 To 4), MonthsOf, i%, xmlInfo$
Dim obWM As New SASWorkspaceManager.WorkspaceManager, obSAS As SAS.Workspace, obSASCode As SAS.LanguageService
Dim  obConnection As New ADODB.Connection, obRecordset As New ADODB.Recordset
Set obSAS = obWM.Workspaces.CreateWorkspaceByServer("", VisibilityProcess, Nothing, "", "", xmlInfo)
Set obSASCode = obSAS.LanguageService
I have spoken to SAS themselves about this and they have informed me that it is an Access 2000 problem. They supplied me with some code that works in VB but not VBA. That code can be found here.

http://support.microsoft.com/default...;EN-US;q239561

Does anyone know the VBA version of this CoInitializeSecurity, as I think that this may be the solution to my problem, either that or I'm gonna have to go back to using OLE.

Cheers

danny.king@orange.co.uk