Data Error 3028 Occurred
set up security on an Access database and want to query it from another MS Office application using VBA scripting. I can easily do this on an unsecured database. How do I do this? Thanks, VBA Dabbler Guest, Feb 11, 2005 #1 Advertisements TC Guest Try something like: (untested) dim e as object, db as database set e = createobject ("DAO.DBEngine.36") e.xxx = "full path to your workgroup file" e.yyy = "Fred" ' username. e.zzz = "s3cr3t" ' password. set db = e.opendatabase ("full path to your database") I forget the property names xxx, yyy and zzz above. I think that they are systemdb, username, password, respectively - but you'll have to check. Replace ".36" according to your DAO version. HTH, TC TC, Feb 12, 2005 #2 Advertisements Guest Guest Thanks for your response. I tried your suggestions, but unsuccessfully. I set: xxx=IniPath, and SystemDB (each separately) yyy=DefaultUser zzz=DefaultPassword I got the following error message: 'Run-time error '3028': Cannot start your application. The workgroup information file is missing or opened exclusively by another user. It appears that it's not getting to the workgroup information file. Any other suggestions? Thanks, VBA Dabbler "TC" wrote: > Try something like: > > (untested) > > dim e as object, db as database > set e = createobject ("DAO.DBEngine.36") > e.xxx = "full path to your workgroup file" > e.yyy = "Fred" ' username. > e.zzz = "s3cr3t" ' password. > set db = e.opendatabase ("full path to your database") > > I forget the property names xxx, yyy and zzz above. I think that they > are systemdb, username, password, respectively - but you'll have to > check. > > Replace ".36" according to your DAO version. > > HTH, > TC > > Guest, Feb 12, 2005 #3 TC Guest Error 3028 can sometimes occur when you use a method of the DBEngine object without providing the "DBEngine." prefix explicitly. Don't set IniPath. You need only set SystemDB. Per
360 games PC games Windows games Windows phone games Entertainment All Entertainment Movies & TV Music Business & Education Business Students & educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet http://www.pcreview.co.uk/threads/getting-data-from-a-secured-access-database-with-vba.1671576/ Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All https://support.microsoft.com/en-us/kb/186543 Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
Join INTELLIGENT WORK FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified http://www.tek-tips.com/viewthread.cfm?qid=141376 Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free! Join Us! *Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs data error by Link To This Forum! Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki reStructuredText code below into your site. Visual Basic(Microsoft): Version 5 & 6 Forum at Tek-Tips HomeForumsProgrammersLanguagesVisual Basic(Microsoft): Version 5 & 6 Forum DAO & ADO Run-time error 3028 thread222-141376 Forum Search FAQs data error 3028 Links MVPs DAO & ADO Run-time error 3028 DAO & ADO Run-time error 3028 NW (Programmer) (OP) 28 Sep 01 10:42 Can anyone tell me what's wrong/missing with my coding please? Every time this runs, program terminates with following error message. Thanks in advance.Run-time error 3028Can't start your application. The workgroup information file is missingor opened exclusively by another user.'###'Code to create an Access(97) table using DAO and ADO to open it'###Dim SysDB As DatabaseDim SysTB As TableDefDim SysFD As FieldSet SysDB = CreateDatabase("C:\test.MDB", dbLangGeneral & ";UserID=Admin;pwd=pwd")Set SysTB = SysDB.CreateTableDef("Tb1")With SysTB.Fields.Append .CreateField("Field1", dbText, 8).Fields("Field_FormID").AllowZeroLength = TrueEnd WithSysDB.TableDefs.Append SysTBDim cn As ADODB.ConnectionSet cn = New ADODB.Connectioncn.ConnectionString = & _"Provider=Microsoft.Jet.OLEDB.3.51;" & _"Persist Security Info=False;" & _"Data Source=c:\Test.mdb;" & _"Pwd=MMG"cn.OpenDim rs As ADODB.RecordsetSet rs = New ADODB.Recordsetrs.Open "Tb1", cn, adOpenKeyset, adLockOptimistic, adCmdTableSet frmMain.Adodc1.Recordset = rs RE: DAO & ADO Run-time error 3028 Sawatzky (Programmer) 28 Sep 01 12:27 Dear NW,where exactly does the error occur, try going through step by step. (using F8)I suppose it occurs when you try to open the adodb.connection.Createdatabase gives back an open d