Unable to connect to the Sql server database

Discussion in 'ASP .Net' started by =?Utf-8?B?Q2FpbGlu?=, Sep 9, 2005.

  1. hi all,
    I can't connect to the Sql server database, and I see this error message:
    "BC30519: Overload resolution failed because no accessible 'New' can be
    called without a narrowing conversion" on the code below with "Here is the
    error code ->". Do anyone know how to fix it! Here is the code

    sub Page_Load

    dim myConnection as New SqlConnection("Provider=sqloledb;Data
    Source=sss3333;Initial Catalog=eDB;User Id=eeee;Password=eeee;")

    "Here is the error code ->" dim myCommand as New SqlDataAdapter("SELECT
    symbol_id, symbol_name FROM d_symbol", myConnection)

    sqlDataReader=myCommand.ExecuteReader()
    listbox1.DataSource = sqlDataReader
    listbox1.DataBind()
    sqlDataReader.Close()

    myConnection.Close()

    end sub

    Thanks
    Cailin
     
    =?Utf-8?B?Q2FpbGlu?=, Sep 9, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?Q2FpbGlu?=

    Clamps Guest

    hmmm... try removing provider=sqloledb
    from your connection string
    "Cailin" <> wrote in message
    news:...
    > hi all,
    > I can't connect to the Sql server database, and I see this error message:
    > "BC30519: Overload resolution failed because no accessible 'New' can be
    > called without a narrowing conversion" on the code below with "Here is the
    > error code ->". Do anyone know how to fix it! Here is the code
    >
    > sub Page_Load
    >
    > dim myConnection as New SqlConnection("Provider=sqloledb;Data
    > Source=sss3333;Initial Catalog=eDB;User Id=eeee;Password=eeee;")
    >
    > "Here is the error code ->" dim myCommand as New SqlDataAdapter("SELECT
    > symbol_id, symbol_name FROM d_symbol", myConnection)
    >
    > sqlDataReader=myCommand.ExecuteReader()
    > listbox1.DataSource = sqlDataReader
    > listbox1.DataBind()
    > sqlDataReader.Close()
    >
    > myConnection.Close()
    >
    > end sub
    >
    > Thanks
    > Cailin
     
    Clamps, Sep 9, 2005
    #2
    1. Advertising

  3. Cailin try seeing some connectionstring here:-
    http://www.connectionstrings.com/
    Hope that helps
    Patrick

    "Clamps" <> wrote in message
    news:...
    > hmmm... try removing provider=sqloledb
    > from your connection string
    > "Cailin" <> wrote in message
    > news:...
    > > hi all,
    > > I can't connect to the Sql server database, and I see this error

    message:
    > > "BC30519: Overload resolution failed because no accessible 'New' can be
    > > called without a narrowing conversion" on the code below with "Here is

    the
    > > error code ->". Do anyone know how to fix it! Here is the code
    > >
    > > sub Page_Load
    > >
    > > dim myConnection as New SqlConnection("Provider=sqloledb;Data
    > > Source=sss3333;Initial Catalog=eDB;User Id=eeee;Password=eeee;")
    > >
    > > "Here is the error code ->" dim myCommand as New SqlDataAdapter("SELECT
    > > symbol_id, symbol_name FROM d_symbol", myConnection)
    > >
    > > sqlDataReader=myCommand.ExecuteReader()
    > > listbox1.DataSource = sqlDataReader
    > > listbox1.DataBind()
    > > sqlDataReader.Close()
    > >
    > > myConnection.Close()
    > >
    > > end sub
    > >
    > > Thanks
    > > Cailin

    >
    >
     
    Patrick.O.Ige, Sep 12, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jamezw
    Replies:
    2
    Views:
    3,623
    jamezw
    Jun 17, 2005
  2. Peter Afonin
    Replies:
    2
    Views:
    777
    Peter Afonin
    Oct 8, 2006
  3. James

    Unable to connect to SQL Server database

    James, Oct 4, 2006, in forum: ASP .Net Security
    Replies:
    3
    Views:
    562
    James
    Oct 6, 2006
  4. ZZ_Scarab
    Replies:
    2
    Views:
    2,461
    ravish
    Jan 5, 2011
  5. James
    Replies:
    2
    Views:
    470
    James
    Oct 4, 2006
Loading...

Share This Page