Error connectiong to database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • helpful sql

    #1

    Error connectiong to database

    Hi,
    I am designing a webpage with the DbNetGrid control on it. I am folloing
    its documentation and using the following connection string to connect the
    grid control to a database:

    'Provider=SQLOL EDB;Driver={SQL
    Server};Server= (local);Databas e=pubs;Trusted_ Connection=yes; '

    But DbNetGrid keeps giving me the following error. I have tried different
    variations of this connection string but nothing seems to work.

    [Microsoft][ODBC Driver Manager] Data source name not found and no default
    driver specified (-2147467259)

    Thanks.


  • Sericinus hunter

    #2
    Re: Error connectiong to database

    helpful sql wrote:[color=blue]
    > Hi,
    > I am designing a webpage with the DbNetGrid control on it. I am folloing
    > its documentation and using the following connection string to connect the
    > grid control to a database:
    >
    > 'Provider=SQLOL EDB;Driver={SQL
    > Server};Server= (local);Databas e=pubs;Trusted_ Connection=yes; '
    >
    > But DbNetGrid keeps giving me the following error. I have tried different
    > variations of this connection string but nothing seems to work.
    >
    > [Microsoft][ODBC Driver Manager] Data source name not found and no default
    > driver specified (-2147467259)[/color]

    You have to create ODBC Data Source object as the message states.
    Look for Data Sources icon in the Control Panel/Administrative Tools.
    Then use its name in the connection string.

    Comment

    • Jeff Dillon

      #3
      Re: Error connectiong to database

      Not neccessarily.

      All connection strings in one place. Find the syntax for your database connection using ADO.NET, ADO, ODBC, OLEDB, C#, VB, VB.NET, ASP.NET and more.


      And no need really to cross-post so much!

      Jeff

      "Sericinus hunter" <serhunt@flash. net> wrote in message
      news:a2P_f.2398 2$NS6.16336@new ssvr30.news.pro digy.com...[color=blue]
      > helpful sql wrote:[color=green]
      >> Hi,
      >> I am designing a webpage with the DbNetGrid control on it. I am
      >> folloing its documentation and using the following connection string to
      >> connect the grid control to a database:
      >>
      >> 'Provider=SQLOL EDB;Driver={SQL
      >> Server};Server= (local);Databas e=pubs;Trusted_ Connection=yes; '
      >>
      >> But DbNetGrid keeps giving me the following error. I have tried different
      >> variations of this connection string but nothing seems to work.
      >>
      >> [Microsoft][ODBC Driver Manager] Data source name not found and no
      >> default driver specified (-2147467259)[/color]
      >
      > You have to create ODBC Data Source object as the message states.
      > Look for Data Sources icon in the Control Panel/Administrative Tools.
      > Then use its name in the connection string.[/color]


      Comment

      • Sericinus hunter

        #4
        Re: Error connectiong to database

        Jeff Dillon wrote:[color=blue]
        > Not neccessarily.
        >
        > http://www.connectionstrings.com[/color]

        Thanks, I did not know that.
        [color=blue]
        > And no need really to cross-post so much![/color]

        I hope your intention was to say that to the original poster.
        [color=blue]
        > Jeff
        >
        > "Sericinus hunter" <serhunt@flash. net> wrote in message
        > news:a2P_f.2398 2$NS6.16336@new ssvr30.news.pro digy.com...[color=green]
        >> helpful sql wrote:[color=darkred]
        >>> Hi,
        >>> I am designing a webpage with the DbNetGrid control on it. I am
        >>> folloing its documentation and using the following connection string to
        >>> connect the grid control to a database:
        >>>
        >>> 'Provider=SQLOL EDB;Driver={SQL
        >>> Server};Server= (local);Databas e=pubs;Trusted_ Connection=yes; '
        >>>
        >>> But DbNetGrid keeps giving me the following error. I have tried different
        >>> variations of this connection string but nothing seems to work.
        >>>
        >>> [Microsoft][ODBC Driver Manager] Data source name not found and no
        >>> default driver specified (-2147467259)[/color]
        >> You have to create ODBC Data Source object as the message states.
        >> Look for Data Sources icon in the Control Panel/Administrative Tools.
        >> Then use its name in the connection string.[/color]
        >
        >[/color]

        Comment

        • helpful sql

          #5
          Re: Error connectiong to database

          No, I had already tried this website and all their examples for Sql Server
          2000 connection strings. They did work from my test application but they did
          not work with DbNetGrid. I had to create an ODBC Data Source in
          Administrative Tools. Then it worked fine.

          Thanks all for help.

          "Sericinus hunter" <serhunt@flash. net> wrote in message
          news:ACR_f.3328 $mu2.302@newssv r24.news.prodig y.net...[color=blue]
          > Jeff Dillon wrote:[color=green]
          >> Not neccessarily.
          >>
          >> http://www.connectionstrings.com[/color]
          >
          > Thanks, I did not know that.
          >[color=green]
          >> And no need really to cross-post so much![/color]
          >
          > I hope your intention was to say that to the original poster.
          >[color=green]
          >> Jeff
          >>
          >> "Sericinus hunter" <serhunt@flash. net> wrote in message
          >> news:a2P_f.2398 2$NS6.16336@new ssvr30.news.pro digy.com...[color=darkred]
          >>> helpful sql wrote:
          >>>> Hi,
          >>>> I am designing a webpage with the DbNetGrid control on it. I am
          >>>> folloing its documentation and using the following connection string to
          >>>> connect the grid control to a database:
          >>>>
          >>>> 'Provider=SQLOL EDB;Driver={SQL
          >>>> Server};Server= (local);Databas e=pubs;Trusted_ Connection=yes; '
          >>>>
          >>>> But DbNetGrid keeps giving me the following error. I have tried
          >>>> different variations of this connection string but nothing seems to
          >>>> work.
          >>>>
          >>>> [Microsoft][ODBC Driver Manager] Data source name not found and no
          >>>> default driver specified (-2147467259)
          >>> You have to create ODBC Data Source object as the message states.
          >>> Look for Data Sources icon in the Control Panel/Administrative Tools.
          >>> Then use its name in the connection string.[/color]
          >>[/color][/color]

          Comment

          Working...