Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Unable to connect to the Sql server database

Reply
Thread Tools

Unable to connect to the Sql server database

 
 
=?Utf-8?B?Q2FpbGlu?=
Guest
Posts: n/a
 
      09-09-2005
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
 
Reply With Quote
 
 
 
 
Clamps
Guest
Posts: n/a
 
      09-09-2005
hmmm... try removing provider=sqloledb
from your connection string
"Cailin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
Patrick.O.Ige
Guest
Posts: n/a
 
      09-12-2005
Cailin try seeing some connectionstring here:-
http://www.connectionstrings.com/
Hope that helps
Patrick

"Clamps" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> hmmm... try removing provider=sqloledb
> from your connection string
> "Cailin" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASPNETDB Problem - Unable to connect to SQL Server database ZZ_Scarab ASP .Net Security 2 01-05-2011 03:45 AM
"Unable to connect to SQL Server database" error when using profile Peter Afonin ASP .Net 2 10-08-2006 07:38 PM
Unable to connect to SQL Server database James ASP .Net Security 3 10-06-2006 06:45 PM
Unable to connect to SQL Server database. James ASP General 2 10-04-2006 02:14 PM
Unable to connect to SQL Server session database jamezw ASP .Net 2 06-17-2005 12:44 PM



Advertisments