Dave's Technophorical Times

A blog about Microsoft's Technologies!
SharePoint :: MVC :: ASP.NET :: IIS :: SQL Server :: Visual Studio :: MS Access


Some users of an ACCDE file get this error message:

"The database cannot be opened because the VBA project contained in it cannot be read."


Here are the details of what I'm doing:

1. I Make ACCDE from MS Access 2010

2. I put ACCDE on the network

3. Users try to load the ACCDE.

4. Some users are successful.

5. Some users get this message:

"The database cannot be opened because the VBA project contained in it cannot be read."


All users have the same install procedure:

1. Project Referenced DLLs

2. MS Access 2010 Runtime



1. The ACCDB file opens and runs properly in Access Development Environment.

2. The ACCDE worked at some point on the user's machine that it now not working.

3. Some of the previous versions now do not work either.

4. We have tried decompiling , compact and repair, and starting a new DB and copying the objects in.



You have compiled the MS Access application with a version that is higher than the one used by the person trying to open the ACCDE file.

This could be as simple as compiling with MS Office 14.0.7151.5001 and the users getting the error is running 14.0.4760.1000. Onece the user is updated to 14.0.7151.5001 then the applicatioin will work again.


In MS Access, sometimes you can get a Write Conflict when trying to update a table that is linked to SQL Server. Following is two suggestions on how to resolve the issue.

1. If the SQL Server table has a bit column, then set a default of 0 or 1 and then do not allow NULLS.

2. If the Table has a nvarchar(MAX) or very large field like nvarchar(4000) then try adding a column of datatype "timestamp".

http://aghy.hu/blog/missing-blank-site-template-in-sharepoint-2013 Thanks Aghy!

When setting up site collections, I mostly use the Blank Site Template. But in SharePoint 2013, there's a big "surprise": no Blank Site Template. Neither for Site Collections nor for subsites:

But hey, I need it back! I want it back! Don't you?

There are two tricks I found.

First, there's still possible to create blank sites by using PowerShell:

  1. Run the command Get-SPWebTemplate to get the full list of the available templates. You can see, the Blank Site template is still there, and it's ID is STS#1:

  2. From this point, creating a new site collection is as easy as this:

    $template = Get-SPWebTemplate "STS#1"

    New-SPSite -Url "<URL for the new site collection>" -OwnerAlias "<domain\user>" -Template $template

Second, believe or not, you can enable this site template for the UI too. Just go to the folder C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\1033\XML, and open the WEBTEMP.XML file. There, you'll find a line like this:

<Configuration ID="1" Title="Blank Site" Hidden="TRUE" ImageUrl="/_layouts/15/images/stbs.png?rev=23" Description="A blank site for you to customize based on your requirements." DisplayCategory="Collaboration" AllowGlobalFeatureAssociations="False" > </Configuration>

Here you go: just change the highlighted tag from Hidden="TRUE" to Hidden="FALSE", save the file, and that's it: next time you want to create a new site, you'll get the Blank Site Template:

NOTE: The term, "DSN-less connection" is not accurate when using Pervasive.SQL relational access, since a DSN must be defined on the server using the Pervasive ODBC Engine Interface.

In the Example below TDATA System DSN Must exist on the server.

If InStr(1, tblDef.Connect, "ODBC") > 0 Then
 'SQL Pervasive Database
 strSQLConnectionString = GetSQLConnectionString()
 'tblDef.Connect = strSQLConnectionString
 tblDef.Connect = "ODBC;driver={Pervasive ODBC Client Interface};ServerName=;ServerDSN=TDATA;" & ";TABLE=" & tblDef.Name
End If


More information is here


Solution Notes

NOTE: The term, "DSN-less connection" is not accurate when using Pervasive.SQL relational access, since a DSN must be defined on the server using the Pervasive ODBC Engine Interface.

The following connection strings can be used to access Pervasive ODBC Engine DSNs programmatically:

1) Setup a DSN on the client machine using the Pervasive ODBC Client Interface. Connection String can be "DSN=myDSN;", assuming the client side DSN is named as myDSN.

2) Without setting up a DSN on the client machine:
Connection String can be "driver={Pervasive ODBC Client Interface};ServerName=myServer;ServerDSN=myDSN;" or
Connection String can be "driver={Pervasive ODBC Client Interface};ServerName=myServer;DBQ=dbName;"

NOTE: Here, myServer is the server name or IP address; myDSN is the server side DSN using the Pervasive ODBC Engine Interface; dbName is the database which is used to define the server side DSN



This problem occurs if fields with a bit data type in the SQL Server-based database have been left blank. Microsoft Access interprets blank fields as fields that contain Null values, and the Jet database engine does not release them. As a result, the records remain locked and are not available for deletion.
To resolve this problem, do not allow Null values, or establish a default value on the fields with a bit data type. To do so, follow these steps:
  1. NOTE: To perform this procedure, you must have the appropriate permissions to modify database objects (db_ddladmin or db_owner).

  2. Start SQL Server Enterprise Manager, and then locate the server where the database is located.
  3. Expand the Databases folder, double-click the database name, and then click Tables.
  4. In the right pane of SQL Server Manager, right-click the table where the field with a bit data type is located, and then click Design Table.
  5. Under Default Value, type either 0 (zero) or 1.

    NOTE: To disallow Null values, clear the appropriate Allow Nulls check box.


‎Reporting Services provides some nice options to allow user’s to feel like they are interacting with the data, by expanding lower levels of detail when they click on the plus (+) sign in the report’s tablix. You can also set the initial Toggle state of report items as expanded i.e. (-) sign.  There is a catch though in that when you Show your initial state as expanded, the items may expand correctly but the toggle sign appears reversed (i.e. +  instead of -).

Nice solution to the problem demonstrated Here.

From this site! http://geekswithblogs.net/WesWeeks/archive/2009/01/21/128874.aspx

Running Windows Vista 64 bit, Sql Server 2008 on a remote server. Using ASP.Net and the Report Viewer control on an asp.net page for a local report. Was also using IIS to host the web site instead of using the web server built into Visual Studio 2008.

Searched and tried everything I could find on the net trying to fix this freaking error. On a whim (and because I didn't know what else to do and was trying everything I could think of) changed the IIS 7.0 app pool to the classic app pool. Angels came singing down from the sky and my report worked.

What a PITA! Hope this post helps someone else.

The Actual Error for me was

Msg 7347, Level 16, State 1, Line 2

OLE DB provider 'SQLNCLI10' for linked server 'Common_Pts' returned data that does not match expected data length for column '[Common_Pts].[Pts].[dbo].[veRegulatoryInstrument].prefix'. The (maximum) expected data length is 4, while the returned data length is 5. 

After creating a linked server in ms sql express. and running the view I got the following error. to solve the problem run sp_refreshview command from the server that is hosting the view.

sp_refreshview [ @viewname = ] 'viewname' 

This is how to fix your missing Right-Click Context Menu option. When you rebuild your profile this sometimes happens.

  • Click Start, type shell:sendto and press ENTER
  • Create a new text document (Right-click - New - Text document)
  • Rename the text file to Mail Recipient.MAPIMail
  • Click Yes when you see the following message:
  • If you change a file name extension, the file may become unusable.

    Are you sure you want to change it?

    Note that after renaming the file, the .MAPIMail extension hides automatically. The Mail Recipient entry should now be restored to the Send To menu.

    From this guys site: http://www.mysharepointadventures.com/2012/11/removing-references-to-old-unused-databases-in-sharepoint-2010/

    Over time, as you create / remove service applications, there is a tendency for SharePoint to retain a list of databases that are no longer in use but still referenced in the SharePoint Config database. If you try to remove the database on the SQL server without first removing it from SharePoint, you will get an event logged periodically on your SharePoint Web Front End about being unable to find / access the missing database.


    To remove the orphan databases / databases that are no longer in use.

    Run SharePoint Management Shell

    Run the command

    Get-SPDatabase | fl name,id

    Locate the database you wish to remove and copy its ID.
    Run the command

    $db = Get-SPDatabase (id)

    Now type Get-SPDatabase again, you should see that the database(s) have been removed.

    The Blogger

    Dave Stuart I'm a Developer with a passion for coding. I enjoy the challengers that come with the job! SharePoint is one of my expert areas along with .NET Web Development with MVC and good old MS Access VBA coding. I Blog so that I can remember how I did that way back when; PLUS all this stuff is searchable! I constantly study and run my own business, Dafran Inc. I have passed 22 Microsoft Exams since 1998 when I first jumped on the treadmill of knowledge. I hope that you enjoy this Blog as much as I enjoy updating it. All the very best from Calgary, Alberta, Canada. contact me at linkedin @ dafran.ca


    <<  April 2021  >>

    View posts in large calendar

    Sign in