Can anyone help.

I would like to access a Microsoft SQL database, but the company who owns the data will only allow the database to be accessed via its .Net business objects.

Is there any way to access the classes of the .Net library using php or is it merely for C programmers??

Any help on the matter would be much appreciated.

Ryan

    Its definetly a process to get it working, but this article helped me to do exactally what you're trying.

    Basically you need to convert the .NET assembly to a COM object, then use PHP's com implementation to access the object.

    Here's the walkthrough

    Erestar

      Thank you very much Erestar.

      I will take a look.

      Q. Did you have much experience with .NET before you attempted this??

      Many thanks

      Ryan

        Yeah, I played around with C# before I realized it was just a rip from Java 😉

        However, I don't know that you'll need very much experience, or to even really appriciate what you're doing, as long as you follow the instructions.

        I had some problems where I needed to add a strong name to my whole project because I was using a COM object as a reference, but I found somewhere that that was well explained too.

        If you get stuck, just ask, but I have a lot of faith in that article so make sure you read through it first.

        Erestar

          If you want to get bleeding edge, you might want to consider playing around with the experimental [man]dotnet[/man] extension.

            Has anyone used the load_dotnet function (or whatever it is) ? From what I remember when I looked at this, all of the user comments still used COM to get their stuff working. I personally didn't try to directly load the assembly, but it would be a lot nicer than having to go through all the strong name and GAC crap. I should think, at the very least, MS Visual Studio should do all of that for you.

            Erestar

              Write a Reply...