ADODBCould not load type 'ADODB.FieldsToInternalFieldsMarshaler' from assembly

后端 未结 6 742
渐次进展
渐次进展 2020-12-09 03:07

I\'m trying to read an ADOBD.Recordset object like this (my first time, so pardon my \"noobness\" :D):

Presentation.Category categorySvc = new Presentation.C         


        
相关标签:
6条回答
  • 2020-12-09 03:48

    Solved:

    Solution Explorer --> Show all files (Menu Item) --> Referances --> Adodb -->(properties) -->Embed Interop Types --> False.

    0 讨论(0)
  • 2020-12-09 03:48

    I got this problem clearing temporary file(VS 2017). Solution for this exception you need to change Solution Explorer > References > adodb > "Then Right click and choose properties" > Embed Interop Types, set "True" to "False"

    0 讨论(0)
  • 2020-12-09 03:49

    It's on the individual references - not in the project properties. In the solution explorer window, open "References" (under the project), and click on the reference in question. The properties window will have an option for Embed Interop Types (for each reference).

    In Visual BAsic 2010:

    To turn off Embed Interop Types:

    Project menu > Show All Files, Solution Explorer: > References: > ADODB > Embed Interof types = False. Microsoft.Office.Interop.Access > Embed Interof types = False

    You will now be able to publish and also ADODB will appear in the: Project Menu > Project Properties… Publish TAB > Application Files

    0 讨论(0)
  • 2020-12-09 03:56

    Got the same problem in VS 2013, and the solution for that is that you go to References and select ADODB, on properties you will see Embed Interof types = True then change it to false.

    0 讨论(0)
  • 2020-12-09 04:03

    Okay, I figured how to do this:

    Presentation.Category categorySvc = new Presentation.Category();
    ADODB.Recordset categories = categorySvc.ListAll("BE", "DUE", "EN", 128);
    categories.MoveFirst();
    while(!categories.EOF)
    {
        var fields = ((dynamic)categories).Fields;
        for (int i = 0; i < fields.Count; i++)
        {
            var field = fields[i];
            var name = field.Name;
            var value = field.Value;
            // ...
        }
        categories.MoveNext();
    }
    
    0 讨论(0)
  • 2020-12-09 04:08

    See what I found on this question here. I referenced yours, but still couldn't get the ADODB to work.

    Little one to add:

    SolutionExplorer --> View All Files. For ADODB: - Embed... = False; - Copy Local = True.

    0 讨论(0)
提交回复
热议问题