Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Unable to connect to the Sql server database (http://www.velocityreviews.com/forums/t109576-unable-to-connect-to-the-sql-server-database.html)

=?Utf-8?B?Q2FpbGlu?= 09-09-2005 06:46 PM

Unable to connect to the Sql server database
 
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 09-09-2005 07:22 PM

Re: Unable to connect to the Sql server database
 
hmmm... try removing provider=sqloledb
from your connection string
"Cailin" <Cailin@discussions.microsoft.com> wrote in message
news:6947DE7C-D7EA-448F-B19C-BD3B84FA180B@microsoft.com...
> 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 09-12-2005 09:50 AM

Re: Unable to connect to the Sql server database
 
Cailin try seeing some connectionstring here:-
http://www.connectionstrings.com/
Hope that helps
Patrick

"Clamps" <Clamps@Spamless.com> wrote in message
news:OOyYgPXtFHA.2072@TK2MSFTNGP14.phx.gbl...
> hmmm... try removing provider=sqloledb
> from your connection string
> "Cailin" <Cailin@discussions.microsoft.com> wrote in message
> news:6947DE7C-D7EA-448F-B19C-BD3B84FA180B@microsoft.com...
> > 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

>
>





All times are GMT. The time now is 07:56 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57