ASP.NET Oledb data connection

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frank Xia

    ASP.NET Oledb data connection

    When I try to build a oedb data connection, I got an error message saying
    "Invalid path or you have to connect to the server the database is resided".
    I can see dataset through Data - Preview dataset. I don't what could be the
    problem. Can soemone please help me with this ASP.net beginner's question?

    Thanks in advance for any help!
  • Rakesh Rajan

    #2
    RE: ASP.NET Oledb data connection

    Hi,

    Is the data source an Access or Excel file?

    --
    HTH,
    Rakesh Rajan
    MVP, MCSD




    "Frank Xia" wrote:
    [color=blue]
    > When I try to build a oedb data connection, I got an error message saying
    > "Invalid path or you have to connect to the server the database is resided".
    > I can see dataset through Data - Preview dataset. I don't what could be the
    > problem. Can soemone please help me with this ASP.net beginner's question?
    >
    > Thanks in advance for any help![/color]

    Comment

    • Jan Bannister

      #3
      Re: ASP.NET Oledb data connection

      Hi Rakesh,

      ODBC will connect to both of those sources.

      Hope that helps,
      Jan

      Comment

      • Jan Bannister

        #4
        Re: ASP.NET Oledb data connection

        How are you an MVP???

        Comment

        • Cor Ligthert [MVP]

          #5
          Re: ASP.NET Oledb data connection

          Frank,

          About what you ask are thousand possibilities how you do this. By instance
          the programming language, however maybe more important, how do you make the
          code for the connection. Do you use a designer and than how?

          As you said you are a beginner, do I suppose that you use the dataadapter,
          which is a wizard. Did you do all the tests which are in that?

          Cor


          Comment

          • Rakesh Rajan

            #6
            Re: ASP.NET Oledb data connection

            Dear Jan,

            I wanted to find whether he was using a file or non-file based data source
            or not.

            If it something like Access or XLS, then security permissions come into play.

            --
            HTH,
            Rakesh Rajan
            MVP, MCSD




            "Jan Bannister" wrote:
            [color=blue]
            > How are you an MVP???
            >
            >[/color]

            Comment

            • Jan Bannister

              #7
              Re: ASP.NET Oledb data connection

              Hey Rakesh,

              Since both of the sources you mentioned are files then there is no way
              (and should be no way) to circumvent file access issues.

              Jan

              Comment

              • Rakesh Rajan

                #8
                Re: ASP.NET Oledb data connection

                Dear Jan,

                You understood my post wrong. Sorry if the message wasn't clear.

                Frank says, he is using OleDb and the error message also mentions about
                'path'. In many cases, if it's an OleDb connection, the data source could be
                an Access or Excel file.

                I wanted to find out whether Frank is using either Access/Excel or a
                non-file based data source.

                If it's Access/Excel, then OleDb needs to create temporary files to open the
                data source. Unless ASPNET or the impersonated user has modify privilages to
                folders having these files, you will get an error. I have mentioned this here:


                I just wanted to check whether Frank was facing something related to this.

                --
                HTH,
                Rakesh Rajan
                MVP, MCSD




                "Jan Bannister" wrote:
                [color=blue]
                > Hey Rakesh,
                >
                > Since both of the sources you mentioned are files then there is no way
                > (and should be no way) to circumvent file access issues.
                >
                > Jan
                >
                >[/color]

                Comment

                • Jan Bannister

                  #9
                  Re: ASP.NET Oledb data connection

                  My Mistake Rakesh,

                  The previouse questio ndidn't appear in my view of the thread.

                  Jan

                  Comment

                  • Frank Xia

                    #10
                    Re: ASP.NET Oledb data connection

                    Sorry. Please accept my apology for late response. I was away this weekend.
                    The database is in Access.
                    Thanks!

                    "Jan Bannister" wrote:
                    [color=blue]
                    > Hey Rakesh,
                    >
                    > Since both of the sources you mentioned are files then there is no way
                    > (and should be no way) to circumvent file access issues.
                    >
                    > Jan
                    >
                    >[/color]

                    Comment

                    • Frank Xia

                      #11
                      Re: ASP.NET Oledb data connection

                      Sorry for late response. Thanks for your help!
                      After I put my ACCESS database in c:\innetpub, I can access the database
                      successfuly. But I wonder why I can not to connect to network drive even the
                      test connection is successed when I tried wizard. Now I hardcoded path in
                      connection string.

                      "Cor Ligthert [MVP]" wrote:
                      [color=blue]
                      > Frank,
                      >
                      > About what you ask are thousand possibilities how you do this. By instance
                      > the programming language, however maybe more important, how do you make the
                      > code for the connection. Do you use a designer and than how?
                      >
                      > As you said you are a beginner, do I suppose that you use the dataadapter,
                      > which is a wizard. Did you do all the tests which are in that?
                      >
                      > Cor
                      >
                      >
                      >[/color]

                      Comment

                      • Cor Ligthert [MVP]

                        #12
                        Re: ASP.NET Oledb data connection

                        Frank,

                        For a access database you probably want to update. Beside that you need
                        therefore to get on the drive, does the accessfile as well needs almost full
                        rights,

                        I hope this helps,

                        Cor


                        Comment

                        Working...