Showing posts with label connect. Show all posts
Showing posts with label connect. Show all posts

Monday, March 26, 2012

Problem in connection to sqlexpress witn ASP.nET

hi all

When I use asp.net 2.1 to connect sql 2005 express locally I got error message to say

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: SQL Network Interfaces, error: 25 - Connection string is not valid)

I use following connection string

ConnectToDb.ConnectionString = "Data Source=servername;InitialCatalog=PushToMail;Integrated Security=true";

for more information : when I open SQLEXPRESS this oblige me to inter

servername : servername\sqlexpress

authentification: windowsauthentification

and when i try this connection

ConnectToDb.ConnectionString = "Data Source=servername\sqlexpress;InitialCatalog=PushToMail;Integrated

Security=true";

l got this erreur "inorganised sequence space"

next time u install sql 2005 ,use both authentication ,windows and sql.

or try to connect sql using your VS 2005 ,if u have.

|||

Read this thread,

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=327846&SiteID=1

It has answer that explains how to enable remote connections.

problem in connecting to SQL2005 on 64 bit machine

Hi,
I am using the following code to connect to SQL2005 database
ADODB::_ConnectionPtr m_pConnection;
m_pConnection. CreateInstance(__uuidof(ADODB::Connectio
n));
m_pConnection->open(Server=aron1;Driver={SQL
Server};database=master;"","",NULL)
if(m_pConnection->GetState() != ADODB::adStateOpen)
done
else
error.
it works fine with SQL2005(32 bit) installed on 32 bit windows XP
machine.
but when I try to connect to SQL2005(either 32bit or 64 bit) installed
on a 64 bit XP machine.it gives me an error
Provider is not specified and there is no designated default provider.
how can I solve this issue ?
Thanks in advance.Can you connect to the said SQL2005 instance with a tool such as Query
Analyzer or osql?
Linchi
"kk.simhadri@.gmail.com" wrote:

> Hi,
> I am using the following code to connect to SQL2005 database
> ADODB::_ConnectionPtr m_pConnection;
> m_pConnection. CreateInstance(__uuidof(ADODB::Connectio
n));
> m_pConnection->open(Server=aron1;Driver={SQL
> Server};database=master;"","",NULL)
> if(m_pConnection->GetState() != ADODB::adStateOpen)
> done
> else
> error.
> it works fine with SQL2005(32 bit) installed on 32 bit windows XP
> machine.
> but when I try to connect to SQL2005(either 32bit or 64 bit) installed
> on a 64 bit XP machine.it gives me an error
> Provider is not specified and there is no designated default provider.
> how can I solve this issue ?
> Thanks in advance.
>|||When you say that you are trying to connect to a 32 or 64 bit machine, you
don't say if you are trying to do this from this new machine or from the
first 32 bit machine; so it's hard to say if you have problem connecting to
a remote machine or if you have problem connecting to a 64 bit machine or
from a 64 bit environment. You don't even tell us if you are able to
connect with SSMS or SSMSE.
If you have problem connecting to a remote machine, make the usual check
about the firewall, the permissions on the remote machine and on the remote
SQL-Server and try using TCP instead of named pipes or the multi-protocol.
If you have problem connecting to a 64 bit machine, try using TCP instead of
named pipes or the multi-protocol.
If you have problem connecting from a 64 machine, first check if you are
running in the simulated 32 bit environment (WOW64) or in the 64 bit
environment. Many older protocols won't be able to run in the 64 bit
environment or to make calls to the 64 bit environment from WOW64. If it
cannot run from the 64 bit environment, use another protocol, if it cannot
make calls to the 64 bit environment, try using TCP instead of named pipes
or use another protocol such as the SQL Native Provider. More info and
troubleshooting:
http://www.connectionstrings.com/?carrier=sqlserver2005
http://blogs.msdn.com/sqlexpress/ar.../05/415084.aspx
http://blogs.msdn.com/sqlexpress/ar.../23/192044.aspx
http://msdn2.microsoft.com/en-us/library/ms345318.aspx
http://www.datamasker.com/SSE2005_NetworkCfg.htm (connection strings for
sql providers)
For SSMSE:
http://www.microsoft.com/downloads/...B8-5A0F62BF7796
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
<kk.simhadri@.gmail.com> wrote in message
news:1175009603.109380.73620@.y80g2000hsf.googlegroups.com...
> Hi,
> I am using the following code to connect to SQL2005 database
> ADODB::_ConnectionPtr m_pConnection;
> m_pConnection. CreateInstance(__uuidof(ADODB::Connectio
n));
> m_pConnection->open(Server=aron1;Driver={SQL
> Server};database=master;"","",NULL)
> if(m_pConnection->GetState() != ADODB::adStateOpen)
> done
> else
> error.
> it works fine with SQL2005(32 bit) installed on 32 bit windows XP
> machine.
> but when I try to connect to SQL2005(either 32bit or 64 bit) installed
> on a 64 bit XP machine.it gives me an error
> Provider is not specified and there is no designated default provider.
> how can I solve this issue ?
> Thanks in advance.
>

problem in connecting to SQL2005 on 64 bit machine

Hi,
I am using the following code to connect to SQL2005 database
ADODB::_ConnectionPtr m_pConnection;
m_pConnection.CreateInstance(__uuidof(ADODB::Conne ction));
m_pConnection->open(Server=aron1;Driver={SQL
Server};database=master;"","",NULL)
if(m_pConnection->GetState() != ADODB::adStateOpen)
done
else
error.
it works fine with SQL2005(32 bit) installed on 32 bit windows XP
machine.
but when I try to connect to SQL2005(either 32bit or 64 bit) installed
on a 64 bit XP machine.it gives me an error
Provider is not specified and there is no designated default provider.
how can I solve this issue ?
Thanks in advance.
Can you connect to the said SQL2005 instance with a tool such as Query
Analyzer or osql?
Linchi
"kk.simhadri@.gmail.com" wrote:

> Hi,
> I am using the following code to connect to SQL2005 database
> ADODB::_ConnectionPtr m_pConnection;
> m_pConnection.CreateInstance(__uuidof(ADODB::Conne ction));
> m_pConnection->open(Server=aron1;Driver={SQL
> Server};database=master;"","",NULL)
> if(m_pConnection->GetState() != ADODB::adStateOpen)
> done
> else
> error.
> it works fine with SQL2005(32 bit) installed on 32 bit windows XP
> machine.
> but when I try to connect to SQL2005(either 32bit or 64 bit) installed
> on a 64 bit XP machine.it gives me an error
> Provider is not specified and there is no designated default provider.
> how can I solve this issue ?
> Thanks in advance.
>

problem in connecting to SQL2005 on 64 bit machine

Hi,
I am using the following code to connect to SQL2005 database
ADODB::_ConnectionPtr m_pConnection;
m_pConnection.CreateInstance(__uuidof(ADODB::Connection));
m_pConnection->open(Server=aron1;Driver={SQL
Server};database=master;"","",NULL)
if(m_pConnection->GetState() != ADODB::adStateOpen)
done
else
error.
it works fine with SQL2005(32 bit) installed on 32 bit windows XP
machine.
but when I try to connect to SQL2005(either 32bit or 64 bit) installed
on a 64 bit XP machine.it gives me an error
Provider is not specified and there is no designated default provider.
how can I solve this issue ?
Thanks in advance.Can you connect to the said SQL2005 instance with a tool such as Query
Analyzer or osql?
Linchi
"kk.simhadri@.gmail.com" wrote:
> Hi,
> I am using the following code to connect to SQL2005 database
> ADODB::_ConnectionPtr m_pConnection;
> m_pConnection.CreateInstance(__uuidof(ADODB::Connection));
> m_pConnection->open(Server=aron1;Driver={SQL
> Server};database=master;"","",NULL)
> if(m_pConnection->GetState() != ADODB::adStateOpen)
> done
> else
> error.
> it works fine with SQL2005(32 bit) installed on 32 bit windows XP
> machine.
> but when I try to connect to SQL2005(either 32bit or 64 bit) installed
> on a 64 bit XP machine.it gives me an error
> Provider is not specified and there is no designated default provider.
> how can I solve this issue ?
> Thanks in advance.
>|||When you say that you are trying to connect to a 32 or 64 bit machine, you
don't say if you are trying to do this from this new machine or from the
first 32 bit machine; so it's hard to say if you have problem connecting to
a remote machine or if you have problem connecting to a 64 bit machine or
from a 64 bit environment. You don't even tell us if you are able to
connect with SSMS or SSMSE.
If you have problem connecting to a remote machine, make the usual check
about the firewall, the permissions on the remote machine and on the remote
SQL-Server and try using TCP instead of named pipes or the multi-protocol.
If you have problem connecting to a 64 bit machine, try using TCP instead of
named pipes or the multi-protocol.
If you have problem connecting from a 64 machine, first check if you are
running in the simulated 32 bit environment (WOW64) or in the 64 bit
environment. Many older protocols won't be able to run in the 64 bit
environment or to make calls to the 64 bit environment from WOW64. If it
cannot run from the 64 bit environment, use another protocol, if it cannot
make calls to the 64 bit environment, try using TCP instead of named pipes
or use another protocol such as the SQL Native Provider. More info and
troubleshooting:
http://www.connectionstrings.com/?carrier=sqlserver2005
http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
http://blogs.msdn.com/sqlexpress/archive/2004/07/23/192044.aspx
http://msdn2.microsoft.com/en-us/library/ms345318.aspx
http://www.datamasker.com/SSE2005_NetworkCfg.htm (connection strings for
sql providers)
For SSMSE:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
<kk.simhadri@.gmail.com> wrote in message
news:1175009603.109380.73620@.y80g2000hsf.googlegroups.com...
> Hi,
> I am using the following code to connect to SQL2005 database
> ADODB::_ConnectionPtr m_pConnection;
> m_pConnection.CreateInstance(__uuidof(ADODB::Connection));
> m_pConnection->open(Server=aron1;Driver={SQL
> Server};database=master;"","",NULL)
> if(m_pConnection->GetState() != ADODB::adStateOpen)
> done
> else
> error.
> it works fine with SQL2005(32 bit) installed on 32 bit windows XP
> machine.
> but when I try to connect to SQL2005(either 32bit or 64 bit) installed
> on a 64 bit XP machine.it gives me an error
> Provider is not specified and there is no designated default provider.
> how can I solve this issue ?
> Thanks in advance.
>

problem in connecting to sql server Express

Hi to all,

i'm installing sql server in my pc as netwrok service.

when i try to connect it, it showing me a error
sql server does not allow remote connections error 26 error locating server/instance (MS Sql server )

how can i resolve this
plz help me out.

it not able to connect the server locally.
when i try to connect it with .\SQLEXPRESS or localhost\SQLEXPRESS it will connect to the DB
But when i use ServerName\SQLEXPRESS it wont connect to DB what the problem plz help me

with Regards
Amjath

Hi Amjath,

Ensure that you have enable remote connection in Surface Area Configuration for Service and also check you have enable TCP/IP and Named Pipe too.

Hemantgiri S. Goswami

|||Hi Goswami,

this time also i faced the same problem Goswami.

the message contains the Following

Cannot connect to ServerName\SQLEXPRESS

An error has occured 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: sql network interfaces, error: 26 - error locating server/instance specified)(Microsoft sql server)

i enabled the remote connection in Surface Area Configuration for Service and also check the third option enable both TCP/IP and Named Pipe .

but this time also i can enter the db using the .\SQLEXPRESS or localhost\SQLEXPRESS.
wat can i do now, plz help me

with Regards

Amjath|||

Hi Amjath,

ensure NET DDE and NET DDE DSDM and SQL Browser Service are started in Control Panel -> Administrative Tools-> Services and firewall rules are also set properly .

Refer sp_setname which will set network name sys.servers .... When did you get this error !? From Application!? Which? Or from SSMS ?

Hemantgiri S. Goswami

|||Hi Goswami,

sorry to ask this what is mean by NET DDE and NET DDE DSDM,
but SQL Browser by defult is in disabled(I have to change that thing to Automatic and then i have to start it manually right).

Right now I'm using sql server studio express only.

With Regards
-Amjath|||

Hi,

These are the Services , SQL Broswer service required because it gives connection information to client computers, start them and see if it works.

And what about the other question i asked !!! When did you get this error ?! While runing any application or while connecting SQL Express from another machine on network ?

Hemantgiri S. Goswami

|||

Sorry to butt in, but I got the same problem and was looking for a solution as well thus found this thread

I get exactly the same message when I try to connect to the SQL EXpress Database from Visual Basic in Visual Studio Express

Both when running Visual Studio Express from a PC with the SQL server loaded on that PC and on another PC with SQL on a network

I click on 'Tools' in VBE then

'Connect to Database'

I navigate via the connect to SQL Server Database dialog to the MS SQL Database.MDF that I wish to connect to

The dialog stays up for some 25 - 30 secs and times out with the error message provided earlier in the threads

(I have not tried the suggested solution - yet - just answering the specific question of where this is happening)

|||

" 26 error locating server/instance ..." means we are not able to locate your server, make sure SQL Browser is running evenif it's local connection. Please refer http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1 to trouble-shoot connectivity issues.

|||

Let's try the simple things first...

Ensure that you've fully configured your instance to accept remote connections per the KB article on the topic, here. If that doesn't solve the problem then try some of the more advanced troubleshooting.

Mike

|||Hi to ALL,

guys that wont get connected.
but when change the property of Alias in sql server configuration manager then its working i dont know wat to do
i changed the protocol to named pipe then its working....
when i changed that to tcp it wont work whats the problem.....

in the surface area configuration i set the option as work for both tcp and named pipe....

i enabled the sql browser also wat goswami said, i did that

plz help me out...from this problem i struggle a lot

with Regards
Amjath|||

Hi Amjath,

Have you opened up Exceptions in the firewall as described in the KB article that I provided? If the firewall is not open you will not be able to connect to SQL Express.

How are you trying to connect?

Mike

|||Hi Mike

Nice to hear from u
i switch off the firewall for this purpose only mike.

till now it wont work

-Amjath|||

Hi Amjath,

Are you saying that once you open an Exception in the firewall you are able to connect?

Be sure you're following the instructions in the KB and opening an Exception, not just turning the firewall off. An Exception will allow specific applications to communicate through the firewall while still offering protection for the rest of your computer.

Mike

|||

This is a very common question that's exacerbated by the generic OSFA error message that gives irrelevant information as often as not. To address this question, I've written a rather long blog entry that walks through the issues and should help get anyone connected to SQL Server. I've also included a very long chapter in my new book that goes even deeper into the mechanics of getting connected. See http://betav.com/blog/billva/2006/06/getting_and_staying_connected.html and www.hitchhikerguides.net

Problem in connecting Sql Server to ASP.NET

I installed SQL Server in My P.C using MSDE.
it is acted as local server.
All are working fine (SQL Server and .NET)

when i am trying connect the Sql Server in .net,
i got the Error Message

"Login failed for SA/"

i am trying to Windows authentication mode,
it also gives the error like,

" login failed for Sqlserver name/asp.net"

can any one give the solution for that?

thanks in advance.

regards,
Murugavelyou need to add a user machinename/ASPNET in the users tab under your database sql server enterprise manager.

hth|||am using microsoft biztalk server but i cant see the user tab under my administration? i cant see also the server enterprise manager on my mssql. please help.|||Hi ndinakar ,

i have already created User Account in Enterpriase Manager,It is working fine in SQL SERVER
but still i got the same error message "Login failed" when connecting from ASP.NET

What is the problem?

regds,
Murugavel

Friday, March 9, 2012

problem deploying report - can't connect to server?

Hello,
I am relatively new to reporting services. I was experimenting with some
already developed reports on a workstation and trying to figure out how
things work. The reports run fine, and I can deploy them from the solution
folder where the reports exist.
Then I tried creating my own report in my own solution folder. I was able
to create a basic report with a paramenter and run it in the IDE. But when I
tried to deploy it, I got an error message that the service could not connect
to the server. Is this like asp/aspx where you need a virtual directory or
something like that in IIS? What do I need to do to deploy my test report
from my new solution folder?
Thanks,
RichOK. I figured out how to deploy my report. I had to go to the solution
explorer, right-clicked on the ReportProject name, selected properties and
entered the name of the server machine where ReportServer resides. My report
successfully deployed.
But how can I access my report on the company intranet? Any suggestions
appreciated.
"Rich" wrote:
> Hello,
> I am relatively new to reporting services. I was experimenting with some
> already developed reports on a workstation and trying to figure out how
> things work. The reports run fine, and I can deploy them from the solution
> folder where the reports exist.
> Then I tried creating my own report in my own solution folder. I was able
> to create a basic report with a paramenter and run it in the IDE. But when I
> tried to deploy it, I got an error message that the service could not connect
> to the server. Is this like asp/aspx where you need a virtual directory or
> something like that in IIS? What do I need to do to deploy my test report
> from my new solution folder?
> Thanks,
> Rich|||OK. Figured this one out also. For posterity I share what I did. I went
back to the solution explorer and right-clicked on the Project Name, selected
properties. In the same dialog where I had to change the server name from
localhost to my server's name, apparently, by default, the startItem is set
to Report1.rdl. My report's name was RptTest1.rdl. The startItem has a
dropdown box where RptTest1.rdl was listed, so I selected it. Then I
re-deployed my report and viola! It showed up on IE along with the parameter
box. It ran fine. Yay!
"Rich" wrote:
> OK. I figured out how to deploy my report. I had to go to the solution
> explorer, right-clicked on the ReportProject name, selected properties and
> entered the name of the server machine where ReportServer resides. My report
> successfully deployed.
> But how can I access my report on the company intranet? Any suggestions
> appreciated.
>
> "Rich" wrote:
> > Hello,
> >
> > I am relatively new to reporting services. I was experimenting with some
> > already developed reports on a workstation and trying to figure out how
> > things work. The reports run fine, and I can deploy them from the solution
> > folder where the reports exist.
> >
> > Then I tried creating my own report in my own solution folder. I was able
> > to create a basic report with a paramenter and run it in the IDE. But when I
> > tried to deploy it, I got an error message that the service could not connect
> > to the server. Is this like asp/aspx where you need a virtual directory or
> > something like that in IIS? What do I need to do to deploy my test report
> > from my new solution folder?
> >
> > Thanks,
> > Rich

Saturday, February 25, 2012

problem creating a sqldatasource connection

I am able to connect but when I try to use the advanced sql generation options the two check boxes are non enabled (generate insert, update, and delete statements

use optimistic concurrency

what is happening the user id has permissions to update/delete/select from the selected table

Are you using a SQL statement that has a JOIN in it? The sql generator does not work with joined tables.

Monday, February 20, 2012

problem connexion to db

i m using an sqlserver base in creating dynamic site with asp.
i m using automatic asp generator code named aspmaker.

in aspmaker i can connect to the db whitout problems and so generate html pages . the problem is that when i ry navigating in my new site i get this message :

error type :
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]connexion fail of user
'AWATEF\IUSR_AWATEF'.
/inbmi/fournisseurlist.asp, line 114

navigator type:
Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Page :
GET /inbmi/fournisseurlist.aspCheck the permissions for the user 'AWATEF\IUSR_AWATEF', check your ODBC configuration, also check the ASP forums.

Problem connection to Express Edition with C#

I'm using .NET 2.0 and SQL Server 2005 Express Edition on WinXP SP2. I'm
using System.Data.SqlClient to connect to the server which is on the same
machine. The SQL Server service is set to log on as "Built-in account: Local
System" and the connection string I'm passing to the constructor is "Data
Source=(local);Initial Catalog=TestDB;" everything else is set to defaults.
I get the following error: "System.Data.SqlClient.SqlException: 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)"
Any help would be greatly appreciated.
I was fiddling around with different connection strings and this one finally
allowed me to connect: "Data Source=.\\SQLEXPRESS;Initial
Catalog=TestDB;Integrated Security=SSPI;"
"Frustrated" wrote:

> I'm using .NET 2.0 and SQL Server 2005 Express Edition on WinXP SP2. I'm
> using System.Data.SqlClient to connect to the server which is on the same
> machine. The SQL Server service is set to log on as "Built-in account: Local
> System" and the connection string I'm passing to the constructor is "Data
> Source=(local);Initial Catalog=TestDB;" everything else is set to defaults.
> I get the following error: "System.Data.SqlClient.SqlException: 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)"
> Any help would be greatly appreciated.
|||You 'normally' always provide at least three pieces of information for a
connection. The Server, the database, and the security context.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Frustrated" <Frustrated@.discussions.microsoft.com> wrote in message
news:0C3946E2-F417-4345-94E7-57B0BA6F9169@.microsoft.com...[vbcol=seagreen]
>I was fiddling around with different connection strings and this one
>finally
> allowed me to connect: "Data Source=.\\SQLEXPRESS;Initial
> Catalog=TestDB;Integrated Security=SSPI;"
> "Frustrated" wrote:

Problem connection to Express Edition with C#

I'm using .NET 2.0 and SQL Server 2005 Express Edition on WinXP SP2. I'm
using System.Data.SqlClient to connect to the server which is on the same
machine. The SQL Server service is set to log on as "Built-in account: Local
System" and the connection string I'm passing to the constructor is "Data
Source=(local);Initial Catalog=TestDB;" everything else is set to defaults.
I get the following error: "System.Data.SqlClient.SqlException: 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)
"
Any help would be greatly appreciated.I was fiddling around with different connection strings and this one finally
allowed me to connect: "Data Source=.\\SQLEXPRESS;Initial
Catalog=TestDB;Integrated Security=SSPI;"
"Frustrated" wrote:

> I'm using .NET 2.0 and SQL Server 2005 Express Edition on WinXP SP2. I'm
> using System.Data.SqlClient to connect to the server which is on the same
> machine. The SQL Server service is set to log on as "Built-in account: Loc
al
> System" and the connection string I'm passing to the constructor is "Data
> Source=(local);Initial Catalog=TestDB;" everything else is set to defaults
.
> I get the following error: "System.Data.SqlClient.SqlException: An error h
as
> occurred while establishing a connection to the server. When connecting t
o
> 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 Serve
r)"
> Any help would be greatly appreciated.|||You 'normally' always provide at least three pieces of information for a
connection. The Server, the database, and the security context.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Frustrated" <Frustrated@.discussions.microsoft.com> wrote in message
news:0C3946E2-F417-4345-94E7-57B0BA6F9169@.microsoft.com...[vbcol=seagreen]
>I was fiddling around with different connection strings and this one
>finally
> allowed me to connect: "Data Source=.\\SQLEXPRESS;Initial
> Catalog=TestDB;Integrated Security=SSPI;"
> "Frustrated" wrote:
>

problem connecting to the database

Hi...

I just started to go through the "Microsoft visual c# 2005 step by step" I noticed on page 412 when i try to connect to the database, it says tochoose "Microsoft SQL server" from the Choose datasource menu. But I dont have Microsoft SQL Server. There are only "Microsoft Access Database file" and "Microsoft SQL Server Database File" and not "Microsoft SQL Server".

Please Help

Sunil

Hi,

Do you have the MDAC 2.6 or later installed?

Regards,

Janos

|||Unless you choose to install SQL Server (download the free SQL Server 2005 Express here), you will have to use the Access file connection process.|||

thanks for the reply Janos... I'm fairly new to the SQL stuff... What is MDAC?

Thanks

Sunil

|||

thanks for the reply arnie.... yes i did install the free sql server 2005 express.... i still cant figure it out... i used the commands at the dos prompt to configure the SQL server like it says in the book and everything was good...

then i used sqlcmd -S yourserver\SQLExpress - E -iinstnwnd.sql

That was also successfull....

still i dont see "microsoft SQL server" in the choose datasource section. But i do see "Microsoft SQL server database file".

Thank you

|||

Hi,

Please follow Arnie Rowland's post. You should have SQL Server installed.

Regards,

Janos

|||Seems that you are using Visual Studio Express. If so, the behaviour is by design.

http://msdn2.microsoft.com/en-us/vstudio/aa700921.aspx

But you can code against it.

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

i'm sorry..i dont follow...what does it mean by design?

thank u

sunil

|||VS Express is not able to connect to SQL Server Express in the GUI (locked down feature) but you can programmtically access the Server.

Jens K. Suessmeyer.

http://www.sqlserver2005.de

Problem connecting to SQL Server via Query Analyzer

SQL 2000/SP3
I recently ran into an issue where I receive an error whenever I try
to connect to my database on a particular server via the Query Analyzer.
The error I receive is
ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver Manager]Driver's
SQLAllocHandle on SQL_HANDLE_ENV failed.
Anyone else run into this before?Do you only have problem connecting to this particular
server? Your ODBC driver may be messed up somehow. See if
you can update your MDAC.
Linchi
quote:

>--Original Message--
>SQL 2000/SP3
>I recently ran into an issue where I receive an error

whenever I try
quote:

>to connect to my database on a particular server via the

Query Analyzer.
quote:

>The error I receive is
>ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver

Manager]Driver's
quote:

>SQLAllocHandle on SQL_HANDLE_ENV failed.
>Anyone else run into this before?
>
>.
>
|||I can't connect to any of our servers and only my machine seems to be
having this issue. I am guessing, that yes, the drivers are fried. I
had
installed some internal application software and then ka-boom... I can't
connect anywhere.
"Linchi Shea" <linchi_shea@.NOSPAMml.com> wrote in message
news:16a801c3df9b$3fb1d5d0$a601280a@.phx.gbl...[QUOTE]
> Do you only have problem connecting to this particular
> server? Your ODBC driver may be messed up somehow. See if
> you can update your MDAC.
> Linchi
>
> whenever I try
> Query Analyzer.
> Manager]Driver's|||Hi Simon,
Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
your issue.
From your information, when connecting to a database on a particular
server byQuery Analyzer, you got the error message as follows:
ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver Manager]Driver's
SQLAllocHandle on SQL_HANDLE_ENV failed.
and you mentiond that you install some other softwares and after that, you
encounter this problem, right?
I wonder if you could login with system administrator account and
re-install the MDAC then reboot your system. You could download MDAC2.8 at:
http://www.microsoft.com/downloads/...0fe3-c795-4b7d-
b037-185d0506396c&DisplayLang=en
Hope this helps and I am looking forward to your response! Thanks.
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Yes, this corrected it!
Thanks!!
"Baisong Wei[MSFT]" <v-baiwei@.online.microsoft.com> wrote in message
news:M$wbGO83DHA.568@.cpmsftngxa07.phx.gbl...
quote:

> Hi Simon,
> Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
> your issue.
> From your information, when connecting to a database on a particular
> server byQuery Analyzer, you got the error message as follows:
> ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver Manager]Driver's
> SQLAllocHandle on SQL_HANDLE_ENV failed.
> and you mentiond that you install some other softwares and after that, you
> encounter this problem, right?
> I wonder if you could login with system administrator account and
> re-install the MDAC then reboot your system. You could download MDAC2.8

at:
quote:

>

http://www.microsoft.com/downloads/...0fe3-c795-4b7d-
quote:

> b037-185d0506396c&DisplayLang=en
> Hope this helps and I am looking forward to your response! Thanks.
> Best regards
> Baisong Wei
> Microsoft Online Support
> ----
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only. Thanks.
>
|||Hi Simon,
Thank you for using MSDN Newsgroup!
I would like to follow up on this issue and see if you still have questions
about this issue. Should you have any questions, please feel free to post
here. Looking forward to your reply!
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Hi there, I see this thread is back from 2004. I am having an issue connecti
ng to a sql server located on another machine on my Intranet. I recieve the
following error:
unable to connect to server ...
server: Msg 17, Level 16, State 1
Microsoft odbc sql server driver odbnetlib sql server does not exit or acces
s
I tried to connect to other sql servers, and I got no problem, except for th
is particular server. any ideas'
From http://www.developmentnow.com/g/118...ry-Analyzer.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com|||1. Server does exist (server name spellign corrcet)?
2. You sure you have permission to access it?
3. Network library compatible?
"Efrain Juarez" <stranger_tepa@.hotmail.com> wrote in message
news:1bf20371-0394-4c54-a975-764a23b202d5@.developmentnow.com...
> Hi there, I see this thread is back from 2004. I am having an issue
> connecting to a sql server located on another machine on my Intranet. I
> recieve the following error:
> unable to connect to server ...
> server: Msg 17, Level 16, State 1
> Microsoft odbc sql server driver odbnetlib sql server does not exit or
> access
> I tried to connect to other sql servers, and I got no problem, except for
> this particular server. any ideas'
> From
> http://www.developmentnow.com/g/118...ry-Analyzer.htm
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com

Problem connecting to SQL Server via Query Analyzer

SQL 2000/SP3
I recently ran into an issue where I receive an error whenever I try
to connect to my database on a particular server via the Query Analyzer.
The error I receive is
ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver Manager]Driver's
SQLAllocHandle on SQL_HANDLE_ENV failed.
Anyone else run into this before?Do you only have problem connecting to this particular
server? Your ODBC driver may be messed up somehow. See if
you can update your MDAC.
Linchi
>--Original Message--
>SQL 2000/SP3
>I recently ran into an issue where I receive an error
whenever I try
>to connect to my database on a particular server via the
Query Analyzer.
>The error I receive is
>ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver
Manager]Driver's
>SQLAllocHandle on SQL_HANDLE_ENV failed.
>Anyone else run into this before?
>
>.
>|||I can't connect to any of our servers and only my machine seems to be
having this issue. I am guessing, that yes, the drivers are fried. I
had
installed some internal application software and then ka-boom... I can't
connect anywhere.
"Linchi Shea" <linchi_shea@.NOSPAMml.com> wrote in message
news:16a801c3df9b$3fb1d5d0$a601280a@.phx.gbl...
> Do you only have problem connecting to this particular
> server? Your ODBC driver may be messed up somehow. See if
> you can update your MDAC.
> Linchi
> >--Original Message--
> >
> >SQL 2000/SP3
> >
> >I recently ran into an issue where I receive an error
> whenever I try
> >to connect to my database on a particular server via the
> Query Analyzer.
> >
> >The error I receive is
> >
> >ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver
> Manager]Driver's
> >SQLAllocHandle on SQL_HANDLE_ENV failed.
> >
> >Anyone else run into this before?
> >
> >
> >.
> >|||Hi Simon,
Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
your issue.
From your information, when connecting to a database on a particular
server byQuery Analyzer, you got the error message as follows:
ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver Manager]Driver's
SQLAllocHandle on SQL_HANDLE_ENV failed.
and you mentiond that you install some other softwares and after that, you
encounter this problem, right?
I wonder if you could login with system administrator account and
re-install the MDAC then reboot your system. You could download MDAC2.8 at:
http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-
b037-185d0506396c&DisplayLang=en
Hope this helps and I am looking forward to your response! Thanks.
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Yes, this corrected it!
Thanks!!
"Baisong Wei[MSFT]" <v-baiwei@.online.microsoft.com> wrote in message
news:M$wbGO83DHA.568@.cpmsftngxa07.phx.gbl...
> Hi Simon,
> Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
> your issue.
> From your information, when connecting to a database on a particular
> server byQuery Analyzer, you got the error message as follows:
> ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver Manager]Driver's
> SQLAllocHandle on SQL_HANDLE_ENV failed.
> and you mentiond that you install some other softwares and after that, you
> encounter this problem, right?
> I wonder if you could login with system administrator account and
> re-install the MDAC then reboot your system. You could download MDAC2.8
at:
>
http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-
> b037-185d0506396c&DisplayLang=en
> Hope this helps and I am looking forward to your response! Thanks.
> Best regards
> Baisong Wei
> Microsoft Online Support
> ----
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only. Thanks.
>|||Hi Simon,
Thank you for using MSDN Newsgroup!
I would like to follow up on this issue and see if you still have questions
about this issue. Should you have any questions, please feel free to post
here. Looking forward to your reply!
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Hi there, I see this thread is back from 2004. I am having an issue connecting to a sql server located on another machine on my Intranet. I recieve the following error:
unable to connect to server ...
server: Msg 17, Level 16, State 1
Microsoft odbc sql server driver odbnetlib sql server does not exit or access
I tried to connect to other sql servers, and I got no problem, except for this particular server. any ideas?
From http://www.developmentnow.com/g/118_2004_1_0_0_468284/Problem-connecting-to-SQL-Server-via-Query-Analyzer.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com|||1. Server does exist (server name spellign corrcet)?
2. You sure you have permission to access it?
3. Network library compatible?
"Efrain Juarez" <stranger_tepa@.hotmail.com> wrote in message
news:1bf20371-0394-4c54-a975-764a23b202d5@.developmentnow.com...
> Hi there, I see this thread is back from 2004. I am having an issue
> connecting to a sql server located on another machine on my Intranet. I
> recieve the following error:
> unable to connect to server ...
> server: Msg 17, Level 16, State 1
> Microsoft odbc sql server driver odbnetlib sql server does not exit or
> access
> I tried to connect to other sql servers, and I got no problem, except for
> this particular server. any ideas'
> From
> http://www.developmentnow.com/g/118_2004_1_0_0_468284/Problem-connecting-to-SQL-Server-via-Query-Analyzer.htm
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com

Problem connecting to sql server express

Hi Guys

i have a problem with my asp.net 2.0 application, I'm trying to connect to sql server database but it gives the following error:

System.Data.SqlClient.SqlException: Cannot open database "MyDatabase" requested by the login. The login failed.
Login failed for user 'Myserver\ASPNET'.

Before i had my application on File System and it was connecting fine, now I moved it to IIS and it doesn't work anymore.

Connection at Web.Config file :

configuration>

<appSettings>

<addkey="ConnectionString"value="server=(local)\SQLEXPRESS; Trusted_Connection=true; database=MyDatabase"></add>

</appSettings>

<connectionStrings/>

How do i create login for that user?

Thanks

Hi, the ASPNET is the IIS account. You can take a look at this post:

http://forums.asp.net/thread/1356875.aspx

|||

Thanks Iori_Jay

That post really helped me, it's working now.

Problem connecting to SQL Server 2000

We have installed SQL Server 2000 in our new server running on Microsoft Windows Server 2003.

We tried to connect to the database in the Server where it is installed. We are able to connect when we give server name. We are unable to connect when we give IP Address of the server.

We have latest SP3a of SQL Server 2000 installed.

Could anyone help us in resolving this issue?

Thanks in Advance.Ensure to use the HOSTS file or LMHOSTS, put the TCP/IP address of the SQL Server server at the start of the line followed by a few spaces followed by the machine name of the SQL Server server.

The HOSTS or LMHOSTS file belongs in the System32\Drivers\Etc directory for client computers running Microsoft Windows NT and Microsoft Windows 2000, or in the \Windows directory for clients running Microsoft Windows ME, Microsoft Windows 98, or Microsoft Windows 95.