Using WPF code in UWP to access database?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I am develping an UWP app in visual studio 2017. I want to read .mdb and access database files for my analysis. I have created two projects in same solution. One with UWP and other with C# .Net. I want to share the C# .Net using reference project approach where I should be able to call a program to read database.



I am new to the overall concept. Can someone please share the example to get input from OLEDB code to UWP application? I am not able to get it working.



I am referencing following article. https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-migrate










share|improve this question

























  • Hello, I think you can go to visual studio -> File -> New -> Project -> Class Library (.Net Standard). This will create a class library project where you can write a code which you will be able to use in WPF and UWP

    – Polly
    Nov 25 '18 at 3:42











  • The important part is wich Framework is targetted. WPF targets usually the .NEt Framework, something beyond 3.5 or so. Meanwhile UWP is WPF targetting .NET Core, with some add related additions. i think the article is about sharing the code between a UWP app and another .NET Core targetting Programm. However there is the superset of target: .NEt Standart. .NET Framework, .NET Core and to some degree even mono are just implementations of that standart.

    – Christopher
    Nov 25 '18 at 5:16













  • Possible duplicate of Read MS access database file (.mdb) in UWP

    – Sir Rufo
    Nov 25 '18 at 7:16


















0















I am develping an UWP app in visual studio 2017. I want to read .mdb and access database files for my analysis. I have created two projects in same solution. One with UWP and other with C# .Net. I want to share the C# .Net using reference project approach where I should be able to call a program to read database.



I am new to the overall concept. Can someone please share the example to get input from OLEDB code to UWP application? I am not able to get it working.



I am referencing following article. https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-migrate










share|improve this question

























  • Hello, I think you can go to visual studio -> File -> New -> Project -> Class Library (.Net Standard). This will create a class library project where you can write a code which you will be able to use in WPF and UWP

    – Polly
    Nov 25 '18 at 3:42











  • The important part is wich Framework is targetted. WPF targets usually the .NEt Framework, something beyond 3.5 or so. Meanwhile UWP is WPF targetting .NET Core, with some add related additions. i think the article is about sharing the code between a UWP app and another .NET Core targetting Programm. However there is the superset of target: .NEt Standart. .NET Framework, .NET Core and to some degree even mono are just implementations of that standart.

    – Christopher
    Nov 25 '18 at 5:16













  • Possible duplicate of Read MS access database file (.mdb) in UWP

    – Sir Rufo
    Nov 25 '18 at 7:16














0












0








0








I am develping an UWP app in visual studio 2017. I want to read .mdb and access database files for my analysis. I have created two projects in same solution. One with UWP and other with C# .Net. I want to share the C# .Net using reference project approach where I should be able to call a program to read database.



I am new to the overall concept. Can someone please share the example to get input from OLEDB code to UWP application? I am not able to get it working.



I am referencing following article. https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-migrate










share|improve this question
















I am develping an UWP app in visual studio 2017. I want to read .mdb and access database files for my analysis. I have created two projects in same solution. One with UWP and other with C# .Net. I want to share the C# .Net using reference project approach where I should be able to call a program to read database.



I am new to the overall concept. Can someone please share the example to get input from OLEDB code to UWP application? I am not able to get it working.



I am referencing following article. https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-migrate







c# wpf ms-access uwp uwp-xaml






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 25 '18 at 7:15









Sir Rufo

14.4k22858




14.4k22858










asked Nov 25 '18 at 2:58









J.Doe.SHJ.Doe.SH

1




1













  • Hello, I think you can go to visual studio -> File -> New -> Project -> Class Library (.Net Standard). This will create a class library project where you can write a code which you will be able to use in WPF and UWP

    – Polly
    Nov 25 '18 at 3:42











  • The important part is wich Framework is targetted. WPF targets usually the .NEt Framework, something beyond 3.5 or so. Meanwhile UWP is WPF targetting .NET Core, with some add related additions. i think the article is about sharing the code between a UWP app and another .NET Core targetting Programm. However there is the superset of target: .NEt Standart. .NET Framework, .NET Core and to some degree even mono are just implementations of that standart.

    – Christopher
    Nov 25 '18 at 5:16













  • Possible duplicate of Read MS access database file (.mdb) in UWP

    – Sir Rufo
    Nov 25 '18 at 7:16



















  • Hello, I think you can go to visual studio -> File -> New -> Project -> Class Library (.Net Standard). This will create a class library project where you can write a code which you will be able to use in WPF and UWP

    – Polly
    Nov 25 '18 at 3:42











  • The important part is wich Framework is targetted. WPF targets usually the .NEt Framework, something beyond 3.5 or so. Meanwhile UWP is WPF targetting .NET Core, with some add related additions. i think the article is about sharing the code between a UWP app and another .NET Core targetting Programm. However there is the superset of target: .NEt Standart. .NET Framework, .NET Core and to some degree even mono are just implementations of that standart.

    – Christopher
    Nov 25 '18 at 5:16













  • Possible duplicate of Read MS access database file (.mdb) in UWP

    – Sir Rufo
    Nov 25 '18 at 7:16

















Hello, I think you can go to visual studio -> File -> New -> Project -> Class Library (.Net Standard). This will create a class library project where you can write a code which you will be able to use in WPF and UWP

– Polly
Nov 25 '18 at 3:42





Hello, I think you can go to visual studio -> File -> New -> Project -> Class Library (.Net Standard). This will create a class library project where you can write a code which you will be able to use in WPF and UWP

– Polly
Nov 25 '18 at 3:42













The important part is wich Framework is targetted. WPF targets usually the .NEt Framework, something beyond 3.5 or so. Meanwhile UWP is WPF targetting .NET Core, with some add related additions. i think the article is about sharing the code between a UWP app and another .NET Core targetting Programm. However there is the superset of target: .NEt Standart. .NET Framework, .NET Core and to some degree even mono are just implementations of that standart.

– Christopher
Nov 25 '18 at 5:16







The important part is wich Framework is targetted. WPF targets usually the .NEt Framework, something beyond 3.5 or so. Meanwhile UWP is WPF targetting .NET Core, with some add related additions. i think the article is about sharing the code between a UWP app and another .NET Core targetting Programm. However there is the superset of target: .NEt Standart. .NET Framework, .NET Core and to some degree even mono are just implementations of that standart.

– Christopher
Nov 25 '18 at 5:16















Possible duplicate of Read MS access database file (.mdb) in UWP

– Sir Rufo
Nov 25 '18 at 7:16





Possible duplicate of Read MS access database file (.mdb) in UWP

– Sir Rufo
Nov 25 '18 at 7:16












1 Answer
1






active

oldest

votes


















0














I honestly have to admit I was not aware of this ability before today, but I will try to do my best to describe it.



First We need to differentiate between 3 things here:




  • .NET Standard

  • .NET Framework

  • .NET Core


.NET Core and .NET Framework are both implementations of the Standard - and a whole lot on top of that. WinForms was never part of the Standard. It was the .NET Framework going "above and beyond". Wich also explains why .NET Core could so easily drop it. Now apparently besides targetting a .NET project agianst .NET Core, .NET Framework or Mono, you can apparently also aim it against .NET Standard.



That means it can be used in both .NET Core and .NET Framework applications, but you only get exactly what was defined in the .NET Standard - none of the additional stuff. And you also have to manually change it in the project properties, there are not (a lot?) of default templates for it.



WPF apps must target .NET Framework. And UWP is little more then WPF + some app related stuff, when you target .NET Core. So they both must target a specific Target Framework.



Unfortunately the OLEDB classes were never part of .NET Standard. If you look at the "Applies to" section, it only applies to the .NET Framework and one version of Xamarian.



If you look at the SQL related classes, it applies both to Core and Framework - but not the Standard. So you could use them in Project targetting Core or Framework, but not the Standart. It appears the DB related classes are just not nearly generic enough to have made it into the Standard.



Mind you the abstract baseclasses for both are in the Standard 2.0. Just their concrete implementations are a minor detail. So you could write your own DB Access clases based on those abstract classes and Interfaces, if you really felt like it.






share|improve this answer


























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53464282%2fusing-wpf-code-in-uwp-to-access-database%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I honestly have to admit I was not aware of this ability before today, but I will try to do my best to describe it.



    First We need to differentiate between 3 things here:




    • .NET Standard

    • .NET Framework

    • .NET Core


    .NET Core and .NET Framework are both implementations of the Standard - and a whole lot on top of that. WinForms was never part of the Standard. It was the .NET Framework going "above and beyond". Wich also explains why .NET Core could so easily drop it. Now apparently besides targetting a .NET project agianst .NET Core, .NET Framework or Mono, you can apparently also aim it against .NET Standard.



    That means it can be used in both .NET Core and .NET Framework applications, but you only get exactly what was defined in the .NET Standard - none of the additional stuff. And you also have to manually change it in the project properties, there are not (a lot?) of default templates for it.



    WPF apps must target .NET Framework. And UWP is little more then WPF + some app related stuff, when you target .NET Core. So they both must target a specific Target Framework.



    Unfortunately the OLEDB classes were never part of .NET Standard. If you look at the "Applies to" section, it only applies to the .NET Framework and one version of Xamarian.



    If you look at the SQL related classes, it applies both to Core and Framework - but not the Standard. So you could use them in Project targetting Core or Framework, but not the Standart. It appears the DB related classes are just not nearly generic enough to have made it into the Standard.



    Mind you the abstract baseclasses for both are in the Standard 2.0. Just their concrete implementations are a minor detail. So you could write your own DB Access clases based on those abstract classes and Interfaces, if you really felt like it.






    share|improve this answer






























      0














      I honestly have to admit I was not aware of this ability before today, but I will try to do my best to describe it.



      First We need to differentiate between 3 things here:




      • .NET Standard

      • .NET Framework

      • .NET Core


      .NET Core and .NET Framework are both implementations of the Standard - and a whole lot on top of that. WinForms was never part of the Standard. It was the .NET Framework going "above and beyond". Wich also explains why .NET Core could so easily drop it. Now apparently besides targetting a .NET project agianst .NET Core, .NET Framework or Mono, you can apparently also aim it against .NET Standard.



      That means it can be used in both .NET Core and .NET Framework applications, but you only get exactly what was defined in the .NET Standard - none of the additional stuff. And you also have to manually change it in the project properties, there are not (a lot?) of default templates for it.



      WPF apps must target .NET Framework. And UWP is little more then WPF + some app related stuff, when you target .NET Core. So they both must target a specific Target Framework.



      Unfortunately the OLEDB classes were never part of .NET Standard. If you look at the "Applies to" section, it only applies to the .NET Framework and one version of Xamarian.



      If you look at the SQL related classes, it applies both to Core and Framework - but not the Standard. So you could use them in Project targetting Core or Framework, but not the Standart. It appears the DB related classes are just not nearly generic enough to have made it into the Standard.



      Mind you the abstract baseclasses for both are in the Standard 2.0. Just their concrete implementations are a minor detail. So you could write your own DB Access clases based on those abstract classes and Interfaces, if you really felt like it.






      share|improve this answer




























        0












        0








        0







        I honestly have to admit I was not aware of this ability before today, but I will try to do my best to describe it.



        First We need to differentiate between 3 things here:




        • .NET Standard

        • .NET Framework

        • .NET Core


        .NET Core and .NET Framework are both implementations of the Standard - and a whole lot on top of that. WinForms was never part of the Standard. It was the .NET Framework going "above and beyond". Wich also explains why .NET Core could so easily drop it. Now apparently besides targetting a .NET project agianst .NET Core, .NET Framework or Mono, you can apparently also aim it against .NET Standard.



        That means it can be used in both .NET Core and .NET Framework applications, but you only get exactly what was defined in the .NET Standard - none of the additional stuff. And you also have to manually change it in the project properties, there are not (a lot?) of default templates for it.



        WPF apps must target .NET Framework. And UWP is little more then WPF + some app related stuff, when you target .NET Core. So they both must target a specific Target Framework.



        Unfortunately the OLEDB classes were never part of .NET Standard. If you look at the "Applies to" section, it only applies to the .NET Framework and one version of Xamarian.



        If you look at the SQL related classes, it applies both to Core and Framework - but not the Standard. So you could use them in Project targetting Core or Framework, but not the Standart. It appears the DB related classes are just not nearly generic enough to have made it into the Standard.



        Mind you the abstract baseclasses for both are in the Standard 2.0. Just their concrete implementations are a minor detail. So you could write your own DB Access clases based on those abstract classes and Interfaces, if you really felt like it.






        share|improve this answer















        I honestly have to admit I was not aware of this ability before today, but I will try to do my best to describe it.



        First We need to differentiate between 3 things here:




        • .NET Standard

        • .NET Framework

        • .NET Core


        .NET Core and .NET Framework are both implementations of the Standard - and a whole lot on top of that. WinForms was never part of the Standard. It was the .NET Framework going "above and beyond". Wich also explains why .NET Core could so easily drop it. Now apparently besides targetting a .NET project agianst .NET Core, .NET Framework or Mono, you can apparently also aim it against .NET Standard.



        That means it can be used in both .NET Core and .NET Framework applications, but you only get exactly what was defined in the .NET Standard - none of the additional stuff. And you also have to manually change it in the project properties, there are not (a lot?) of default templates for it.



        WPF apps must target .NET Framework. And UWP is little more then WPF + some app related stuff, when you target .NET Core. So they both must target a specific Target Framework.



        Unfortunately the OLEDB classes were never part of .NET Standard. If you look at the "Applies to" section, it only applies to the .NET Framework and one version of Xamarian.



        If you look at the SQL related classes, it applies both to Core and Framework - but not the Standard. So you could use them in Project targetting Core or Framework, but not the Standart. It appears the DB related classes are just not nearly generic enough to have made it into the Standard.



        Mind you the abstract baseclasses for both are in the Standard 2.0. Just their concrete implementations are a minor detail. So you could write your own DB Access clases based on those abstract classes and Interfaces, if you really felt like it.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 25 '18 at 8:13









        Klaus Gütter

        2,60231422




        2,60231422










        answered Nov 25 '18 at 5:37









        ChristopherChristopher

        2,9972824




        2,9972824
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53464282%2fusing-wpf-code-in-uwp-to-access-database%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            Academy of Television Arts & Sciences

            L'Équipe

            1995 France bombings