UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Db_sec_e_auth_failed Error Message On Creating Accessdb Using Batch Job, Access 2016    
 
   
bhargava.konduru
post Feb 27 2020, 02:33 AM
Post#1



Posts: 1
Joined: 27-February 20



Hi Everyone,

I am trying to run a batch job which is triggered from my client machine lets say Machine A, and job runs on server Machine lets say Machine B.

the job is to create access db(.MDB) file using OLEDB Manager object(using CreateDataSource() method). The access db has to be created on my client machine which is a shared path, which has permission to Machine B.

So the problem is whenever i run the job , i am getting the error like DB_SEC_E_AUTH_FAILED.

Property sets used before CreateDataSource()
sDBProp[0].dwPropertyID = DBPROP_INIT_DATASOURCE;
sDBProp[0].vValue.vt = VT_BSTR;
sDBProp[0].vValue.bstrVal = SysAllocString( cov_bstrDatabaseName.bstrVal ); //I have tried @ before the path of the .mdb as well

sDBProp[1].dwPropertyID = DBPROP_JETOLEDB_ENGINE;
sDBProp[1].vValue.vt = VT_I4;
sDBProp[1].vValue.lVal = JETDBENGINETYPE_JET4X;

sDBProp[2].dwPropertyID = DBPROP_JETOLEDB_DATABASELOCKMODE;
sDBProp[2].vValue.vt = VT_I4;
sDBProp[2].vValue.lVal = DBPROPVAL_DL_ALCATRAZ; //JET_DATABASELOCKMODE_ROW;

Machine B environment:

Office 365
MS Access 2010
MS ACCESS 2016

Thanks in advance ..!!
Go to the top of the page
 
msbad1959
post Feb 27 2020, 07:51 AM
Post#2



Posts: 40
Joined: 5-June 18



Not sure why you're still using mdb instead of accdb, but I use this to create a new empty database. I tested it and it will create an mdb.

CODE
Public Function CreateDb(strDb as string) as Boolean
    On error goto proc_err

    created = true

    access.dbengine.createdatabase strdb, DB_LANG_GENERAL

proc_exit:
    exit function

proc_err:
    msgbox "Error #" & err.number & vbcrlf & err.description, vbinformation, "modulename.CreateDb"
    CreateDb = False
    resume proc_exit

This post has been edited by msbad1959: Feb 27 2020, 07:54 AM
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    5th April 2020 - 09:01 AM