Showing posts with label connecting. Show all posts
Showing posts with label connecting. Show all posts

Sunday, March 25, 2012

A weird error !

I was developing a data-driven website but I got this error

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

(I have Sql server 2005 also downloaded before)

Please help me cause any website that has data can not be executed even the quick start tutorial that ships with the ASP.NET 2.0

What should I do?

Hey,

If you go into the SQL Server Surface Area Configuration, then view the components, you can enable remote connections, which may solve the problem.

Friday, February 24, 2012

A question about connecting with SQL server - Help

Hi -Please read below - to help me - thanks

May i explain what i want to do, im a webmaster of my friend's server, i would like to know how i can acess the SQL Server of my friend to put on the homepage ( im doing the home page), so its a remote access, i think, then i want to access a Database the server, i try many times but not happens on the page, it shows blank, im using two programs the ''Web matrix'' and ''Dreamweaver'', please one month ago im trying do to this but it never fuction.

Database name: MuOnline
Table: MEMB_STATS
Column: memb stats

Please i must know it... Thank you !www.connectionstrings.com has a section on SQL Server on the front page, expand it and it will show connection strings and the code to use them.|||i think this site too complex|||i think the site complex, so can u read my case, and say what type of conecction I must use:

please over!

- type of connections:

ODBC
OLE DB, OleDbConnection
sqlconnection
data shape|||SqlConnection. You need to know whether you will use integrated security, or a username and password. No one can tell you which you should use, the type you use is up to how your sql server is set up.|||thanks, but i have 5 questions to do, but if possible can i send a emal to you? i need to know some questions that i dont know....answer me if can i

Thanks otherwise!|||when i finish the connection, how can i do to acess a especifc table or column?
In my case to show who is online in the sql server.|||my second question is; Are the ID and Pass, needed? Or if i want?|||No, I don't think I will help you with your homework. If you have questions, post them here and we will see what we can do.|||This depends upon how your database was set up by whoever installed it. Do you have a username and password? If so, use that.|||http://www.dotnetjunkies.com/quickstart/aspplus/doc/webdataaccess.aspx#adoplus|||douglas thanks!

when i finish the connectinstring, and the conection to the tables...nothing more to do?
i have to do this page on a .ASP page??

Thanks otherwise.|||This is an ASP.NET forum, and I have been pointing you to resources got use with ASP.NET, not classic ASP.

If this IS ASP.NET, after this code:

Dim myConnection As New SqlConnection( _
"server=(local)\NetSDK;database=pubs;Integrated Security=SSPI")
Dim myCommand As New SqlDataAdapter("select * from Authors", myConnection)

Dim ds As New DataSet()
myCommand.Fill(ds, "Authors")

you can check:

ds.Tables[0].Rows[0]["Name Of Your Field"].ToString() to get a string representation of the field named.|||thanks so much!

The sql server dont have username and pass.
---------------------------
Dim myConnection As New SqlConnection( _
"server=(local)\NetSDK;database=pubs;Integrated Security=SSPI")
Dim myCommand As New SqlDataAdapter("select * from Authors", myConnection)

Dim ds As New DataSet()
myCommand.Fill(ds, "Authors")

ds.Tables[0].Rows[0]["Name Of Your Field"].ToString()
----------------------------
can i use this to acess my sql server??|||''pubs''= the name of the database
''server'' = DSN
'' Authors'' = table
second ''Authors''= name of column
''Name of Your field''= name of column]

IS it correct?
if it isnt correct over for me please.

-----------------
Dim myConnection As New SqlConnection( _
"server=(local)\NetSDK;database=pubs;Integrated Security=SSPI")
Dim myCommand As New SqlDataAdapter("select * from Authors", myConnection)

Dim ds As New DataSet()
myCommand.Fill(ds, "Authors")

ds.Tables[0].Rows[0]["Name Of Your Field"].ToString()

Sunday, February 19, 2012

A problem with connecting to a Oct. CTP server

Hi, folks
I think I need a little help here. I uninstall the beta2 version and installed Oct. CTP. The server was using named-instance so I took it as it was. Installatoin went fine and attached privious databases in SQL Management Studio. That means, I am able to sign on the SQL server in the same box using SQL Management Studio. However, from developers (I believe it's beta2 version) could not register this server (my-dev02\sql2005) on their SQL Management Studio.

The error is
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. (.Net SqlClient Data Provider)

I tried from another server (signed on as Domain Admin) using Windows Auth. I got same error msg. IPAddress is enabled, TCP/IP also enabled... Could not think of any more setting. Appreciate in advance.

SunnyFound a trick that is turn SQL Browser service on. Some how it disabled.|||As you found out, as a result of the security considerations, it's off by default for certain SKUs.