Showing posts with label ado. Show all posts
Showing posts with label ado. Show all posts

Sunday, March 25, 2012

connection pooling feature with ADO?[fixed question]

I know that ADO with SQL Server has connection pooling feature. Considering
this, I cannot understand why the problem described below occurs.
Please reply me any solution. Thanks in advance.
Regards,
Hyun-jik Bae
Environment:
SQL Server 2000
ADO 2.8
Condition:
Simultaneous one thread opens ADO connection, updates a record and closes
it. This is done 50 times per second.
Problem:
After running the condition I mentioned above for about a minute, a lot of
TCP connection to 1433 on TIME_WAIT state remains.Hi
How many connections are shown by sp_who2 during and after this period?
Regards
Mike
"Bae,Hyun-jik" wrote:

> I know that ADO with SQL Server has connection pooling feature. Considerin
g
> this, I cannot understand why the problem described below occurs.
> Please reply me any solution. Thanks in advance.
> Regards,
> Hyun-jik Bae
> --
> Environment:
> SQL Server 2000
> ADO 2.8
> Condition:
> Simultaneous one thread opens ADO connection, updates a record and closes
> it. This is done 50 times per second.
> Problem:
> After running the condition I mentioned above for about a minute, a lot of
> TCP connection to 1433 on TIME_WAIT state remains.
>
>
>|||sp_who2 says there is only one during that period. However, a lot of 1433
TCP connections still exists.
Regards,
Hyun-jik
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:D8ABCB63-D676-46B4-A152-90F084FD58BB@.microsoft.com...
> Hi
> How many connections are shown by sp_who2 during and after this period?
> Regards
> Mike
> "Bae,Hyun-jik" wrote:
>

connection pooling feature with ADO?

I know that ADO with SQL Server has connection pooling feature. Considering
this, I cannot understand why the problem described below occurs.
Please reply me any solution. Thanks in advance.
Regards,
Hyun-jik Bae
Environment:
SQL Server 2000
ADO 2.8
Condition:
Simultaneous one thread opens ADO connection, updates a record and closes
it. This is done 50 times per second.
Problem:
After running the condition I mentioned above for about a minute, every ADO
Connection object in a program occupies a TCP connection to 1433.Hi
If you are using ODBC then it might not be enabled see
http://www.aspfaq.com/show.asp?id=2155
You may also want to look at
http://msdn.microsoft.com/library/d...
ng2.asp
John
"Bae,Hyun-jik" wrote:

> I know that ADO with SQL Server has connection pooling feature. Considerin
g
> this, I cannot understand why the problem described below occurs.
> Please reply me any solution. Thanks in advance.
> Regards,
> Hyun-jik Bae
> --
> Environment:
> SQL Server 2000
> ADO 2.8
> Condition:
> Simultaneous one thread opens ADO connection, updates a record and closes
> it. This is done 50 times per second.
> Problem:
> After running the condition I mentioned above for about a minute, every AD
O
> Connection object in a program occupies a TCP connection to 1433.
>
>

Thursday, March 22, 2012

connection pooling

Hi,
Is there a way to enable connection pooling with SQL Server 2005 with ADO,
OLEDB ? (from c++, not .net)
If client is connecting with the same connection string pooling is
automatically created?
thanksConnection Pooling is implemented by the .NET provider or the OLEDB
provider. AFAIK, the OLEDB provider turns this on by itself. My question is:
why are you using OLE DB to access SQL Server?
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Andy" <kc2ine@.yahoo.com> wrote in message
news:eEXb6EPIIHA.4296@.TK2MSFTNGP04.phx.gbl...
> Hi,
> Is there a way to enable connection pooling with SQL Server 2005 with ADO,
> OLEDB ? (from c++, not .net)
> If client is connecting with the same connection string pooling is
> automatically created?
> thanks
>

connection pooling

Hi,
Is there a way to enable connection pooling with SQL Server 2005 with ADO,
OLEDB ? (from c++, not .net)
If client is connecting with the same connection string pooling is
automatically created?
thanks
Connection Pooling is implemented by the .NET provider or the OLEDB
provider. AFAIK, the OLEDB provider turns this on by itself. My question is:
why are you using OLE DB to access SQL Server?
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Andy" <kc2ine@.yahoo.com> wrote in message
news:eEXb6EPIIHA.4296@.TK2MSFTNGP04.phx.gbl...
> Hi,
> Is there a way to enable connection pooling with SQL Server 2005 with ADO,
> OLEDB ? (from c++, not .net)
> If client is connecting with the same connection string pooling is
> automatically created?
> thanks
>

Connection over a router!

I am using SQL 2000 and I need to connect to it through an application
that uses ADO.
- The server is on a machine that is behind a router, the router is
configured to
map port 1433 to the same port number on the machine hosting SQL server.
- And the actual network configuration shown only TCP/IP as the
communication
protocol used.
So far I did not have any luck with the connection although I am not a
network
specialist.
I was told that the router may have the DMZ configured and that may be the
reason
for connection failure.
Any ideas?
Cheers!"Enver Buzoku" <ebuzoku@.hotmail.com> wrote in message
news:uR3%23C9wwDHA.1736@.TK2MSFTNGP09.phx.gbl...
> I am using SQL 2000 and I need to connect to it through an application
> that uses ADO.
> - The server is on a machine that is behind a router, the router is
> configured to
> map port 1433 to the same port number on the machine hosting SQL server.
> - And the actual network configuration shown only TCP/IP as the
> communication
> protocol used.
> So far I did not have any luck with the connection although I am not a
> network
> specialist.
> I was told that the router may have the DMZ configured and that may be the
> reason
> for connection failure.
> Any ideas?
1) Test TCP/IP connectivity.
Use a port sniffer to determine if you can connect over TCP/IP to port 1433
on the computer.
Telnet is a poor-man's port sniffer. Open a command prompt and type
telnet 123.123.123.123 1433
Use a numeric IP address to defer name resolution issues.
If you get a blank black screen, then you have succeeded in connecting over
TCP/IP to the target machine (then just close the window, there's nothing
you can do with this connection).
If you get an error message, then you've got a problem.
2) Test SQL connectivity over TCP/IP.
Make sure you are using the TCP/IP net library to connect. Methods for this
depends a little on your environemnt and whether you have the SQL tools
installed, but you can always create a new ODBC connection from the control
panel to test this. Just be sure to specify TCP/IP in the "Client
Configuration" section.
Davidsqlsql

Sunday, March 11, 2012

Connection for the ADO RecordSet

Hi! All,

I have an old ado application like following:

pCadoCon = new CADOConnection;

pCadoCon->Open (_T"driver={...A OEM driver...}; UID=..;PWD=....", _T (""), _T (""));

//some OEM driver unlocking code

pCadors = new CADORs;

pCadors->Open (_T"select foo from bar", pCadoCon->m_lpDispatch, eCursor); //SQL: a select statement here

The CADOConnection and CADORs are ADO connection, RecordSet wrapper classes created with ClassWizard.

I successfully open an ADO connection using the OEM driver by this DSN less way, and then passed it to ADO Recordset. From ODBC trace, I found that under the cover of the ADO, this connection is used to execute the select statement, but after that it automatically opens an other connection. I do not know why and is it possible to disable this?

I suspect it's opening another connection to provide a back channel to post updates to a scrollable, updatable rowset. Can it be disabled? Ah, sure. Open a ROFO Recordset.

Connection For Clustered Server

We have having a problem connecting to our 4 node cluster using an ado.net connection.
Here is what we have:

Connection String:


<appSettings>
<add key="ConnectionString" value="workstation id=AH501780;packet size=4096;integrated security=SSPI;data source=XXXXXX\XXXXXX;persist security info=False;initial catalog=xxxx" />
</appSettings>

We added in the Web.config file:


<identity impersonate="true"/>
<authentication mode="Windows" />

In IIS 6 we have windows authentication checked.

We get the following error when we try to run the program:


SQL Server does not exist or access denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.

We have the SQL Profiler running and we don't see any connection being made. Any help would be appreciated!

Thanks,
TreyTry this for general error message troubleshooting:

http://support.microsoft.com/default.aspx?kbid=328306

It could also be caused due to an incorrect renaming of the cluster:

http://support.microsoft.com/default.aspx?kbid=307336

Are you going through a firewall? Try this:

http://support.microsoft.com/default.aspx?kbid=318432

Also, is the SQL Server updated with SP3?|||We got a little further with our problem. We have a VB.net windows application that will connect using that connection string. But the asp.net app will not. We also now added a port number to the connection string and we get the following error:


Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

So once again I hit another wall.

Trey|||In IIS, check under Authentication to see if "Anonymous" authentication is still enabled. Or you could add the following to your web.config (if it is already there, replace it with this):

<authorization>
<deny users="?" />
</authorization>|||Just wondering...dose my server need to use Active Directory?|||Is the SQL Server on the same server as the web server? If so, no. Otherwise, you need to configure the setup differently if you are not using AD.|||the web server and the SQL culter are on different boxes. where do i need to look now?|||Try creating a domain account on the network, then give that account permission to log into the SQL Server cluster. Then have your web app impersonate that account and see what happens.

Wednesday, March 7, 2012

Connection Error: ADO.Net and SQL Server 2005

Hi guys,
I have an application that uses ADO.Net (2.0) to connect to SQL Server.
We've never had any problems connecting to SQL Server 2005 using this
application, but one client has had problems and the error he gets is of the
type "General Connection Error...[Microsoft][ODBC SQL Server
Driver][DBNETLIB]ConnectionRead (rec())."
I asked him to create an ODBC connection in Windows just to see if it
was only the application, and he has no problem connecting through ODBC.
So, as you can see, it is very puzzling because when we've had problems
in the past, ODBC would not work either.
Is there some issue with ADO.Net (2.0) and SQL Server 2005? Remember
that other clients are using the software connecting to SQL 2005 with no
problem.
The user says that Firewall is disabled and Remote Connection is enabled
at the server.
Anything else I could check'
Any help will be greatly appreciated.
Thank you,
MaerWell, using ODBC to connect to SQL Server (any version) can and does work.
However, it's certainly not the best way to do so--I recommend SqlClient.
Search my blog for "Connecting" and read the whitepapers there that discuss
the issues.
hth
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Maer" <maer@.auditleverage.com> wrote in message
news:e$qgOMlvHHA.5036@.TK2MSFTNGP03.phx.gbl...
> Hi guys,
> I have an application that uses ADO.Net (2.0) to connect to SQL Server.
> We've never had any problems connecting to SQL Server 2005 using this
> application, but one client has had problems and the error he gets is of
> the type "General Connection Error...[Microsoft][ODBC SQL Server
> Driver][DBNETLIB]ConnectionRead (rec())."
> I asked him to create an ODBC connection in Windows just to see if it
> was only the application, and he has no problem connecting through ODBC.
> So, as you can see, it is very puzzling because when we've had problems
> in the past, ODBC would not work either.
> Is there some issue with ADO.Net (2.0) and SQL Server 2005? Remember
> that other clients are using the software connecting to SQL 2005 with no
> problem.
> The user says that Firewall is disabled and Remote Connection is
> enabled at the server.
> Anything else I could check'
> Any help will be greatly appreciated.
> Thank you,
> Maer
>
>|||Hi Bill,
Thank you for your reply. I am actually using SqlClient, I only created
an ODBC connection to troubleshoot the problem.
So basically, I can connect to the server through an ODBC connection (in
the Data Sources in Windows), but when I try to use SqlClient to establish a
connection, it fails. The connection string is something like this:
"data source=servername;persist security info=True;initial
catalog=databasename;user id=username;Trusted_Connection=yes"
Once again, the error is "General Connection Error...[Microsoft][ODB
C
SQL Server Driver][DBNETLIB]ConnectionRead (rec())."
It is very puzzling because this client doesn't seem to have anything
different in his configuration.
So far I haven't heard of any problems with .Net 2.0 and SQL Server
2005. Could it be .Net?
Thanks,
Maer
"William (Bill) Vaughn" <billvaRemoveThis@.betav.com> wrote in message
news:eCBwqunvHHA.1212@.TK2MSFTNGP05.phx.gbl...
> Well, using ODBC to connect to SQL Server (any version) can and does work.
> However, it's certainly not the best way to do so--I recommend SqlClient.
> Search my blog for "Connecting" and read the whitepapers there that
> discuss the issues.
> hth
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ----
---
> "Maer" <maer@.auditleverage.com> wrote in message
> news:e$qgOMlvHHA.5036@.TK2MSFTNGP03.phx.gbl...
>|||Okay, User ID and Trusted Connection are mutually exclusive. Either your
Windows ID is trusted or it's not. Did you read the whitepaper on
connecting?
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Maer" <maer@.auditleverage.com> wrote in message
news:uuvLyFBwHHA.4992@.TK2MSFTNGP04.phx.gbl...
> Hi Bill,
> Thank you for your reply. I am actually using SqlClient, I only created
> an ODBC connection to troubleshoot the problem.
> So basically, I can connect to the server through an ODBC connection
> (in the Data Sources in Windows), but when I try to use SqlClient to
> establish a connection, it fails. The connection string is something like
> this:
> "data source=servername;persist security info=True;initial
> catalog=databasename;user id=username;Trusted_Connection=yes"
> Once again, the error is "General Connection Error...[Microsoft]
1;ODBC
> SQL Server Driver][DBNETLIB]ConnectionRead (rec())."
> It is very puzzling because this client doesn't seem to have anything
> different in his configuration.
> So far I haven't heard of any problems with .Net 2.0 and SQL Server
> 2005. Could it be .Net?
> Thanks,
> Maer
>
> "William (Bill) Vaughn" <billvaRemoveThis@.betav.com> wrote in message
> news:eCBwqunvHHA.1212@.TK2MSFTNGP05.phx.gbl...
>|||Hi Bill,
Thank you so much for your help. I had read your articles which were
extremely helpful!
It turns out that the problem was that the client had an alias with an
invalid port. He insisted that the port was correct until I asked him to
indulge me and try the default 1433.
The funny thing is that when the port was invalid in the past, the error
I would usually get was something like "server does not exist." So this
error really threw me off.
Once again - thank you for your time.
Maer
"William (Bill) Vaughn" <billvaRemoveThis@.betav.com> wrote in message
news:eZBb2gLwHHA.484@.TK2MSFTNGP06.phx.gbl...
> Okay, User ID and Trusted Connection are mutually exclusive. Either your
> Windows ID is trusted or it's not. Did you read the whitepaper on
> connecting?
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ----
---
> "Maer" <maer@.auditleverage.com> wrote in message
> news:uuvLyFBwHHA.4992@.TK2MSFTNGP04.phx.gbl...
>

Connection Error: ADO.Net and SQL Server 2005

Hi guys,
I have an application that uses ADO.Net (2.0) to connect to SQL Server.
We've never had any problems connecting to SQL Server 2005 using this
application, but one client has had problems and the error he gets is of the
type "General Connection Error...[Microsoft][ODBC SQL Server
Driver][DBNETLIB]ConnectionRead (rec())."
I asked him to create an ODBC connection in Windows just to see if it
was only the application, and he has no problem connecting through ODBC.
So, as you can see, it is very puzzling because when we've had problems
in the past, ODBC would not work either.
Is there some issue with ADO.Net (2.0) and SQL Server 2005? Remember
that other clients are using the software connecting to SQL 2005 with no
problem.
The user says that Firewall is disabled and Remote Connection is enabled
at the server.
Anything else I could check?
Any help will be greatly appreciated.
Thank you,
Maer
Well, using ODBC to connect to SQL Server (any version) can and does work.
However, it's certainly not the best way to do so--I recommend SqlClient.
Search my blog for "Connecting" and read the whitepapers there that discuss
the issues.
hth
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Maer" <maer@.auditleverage.com> wrote in message
news:e$qgOMlvHHA.5036@.TK2MSFTNGP03.phx.gbl...
> Hi guys,
> I have an application that uses ADO.Net (2.0) to connect to SQL Server.
> We've never had any problems connecting to SQL Server 2005 using this
> application, but one client has had problems and the error he gets is of
> the type "General Connection Error...[Microsoft][ODBC SQL Server
> Driver][DBNETLIB]ConnectionRead (rec())."
> I asked him to create an ODBC connection in Windows just to see if it
> was only the application, and he has no problem connecting through ODBC.
> So, as you can see, it is very puzzling because when we've had problems
> in the past, ODBC would not work either.
> Is there some issue with ADO.Net (2.0) and SQL Server 2005? Remember
> that other clients are using the software connecting to SQL 2005 with no
> problem.
> The user says that Firewall is disabled and Remote Connection is
> enabled at the server.
> Anything else I could check?
> Any help will be greatly appreciated.
> Thank you,
> Maer
>
>
|||Hi Bill,
Thank you for your reply. I am actually using SqlClient, I only created
an ODBC connection to troubleshoot the problem.
So basically, I can connect to the server through an ODBC connection (in
the Data Sources in Windows), but when I try to use SqlClient to establish a
connection, it fails. The connection string is something like this:
"data source=servername;persist security info=True;initial
catalog=databasename;user id=username;Trusted_Connection=yes"
Once again, the error is "General Connection Error...[Microsoft][ODBC
SQL Server Driver][DBNETLIB]ConnectionRead (rec())."
It is very puzzling because this client doesn't seem to have anything
different in his configuration.
So far I haven't heard of any problems with .Net 2.0 and SQL Server
2005. Could it be .Net?
Thanks,
Maer
"William (Bill) Vaughn" <billvaRemoveThis@.betav.com> wrote in message
news:eCBwqunvHHA.1212@.TK2MSFTNGP05.phx.gbl...
> Well, using ODBC to connect to SQL Server (any version) can and does work.
> However, it's certainly not the best way to do so--I recommend SqlClient.
> Search my blog for "Connecting" and read the whitepapers there that
> discuss the issues.
> hth
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ------
> "Maer" <maer@.auditleverage.com> wrote in message
> news:e$qgOMlvHHA.5036@.TK2MSFTNGP03.phx.gbl...
>
|||Okay, User ID and Trusted Connection are mutually exclusive. Either your
Windows ID is trusted or it's not. Did you read the whitepaper on
connecting?
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Maer" <maer@.auditleverage.com> wrote in message
news:uuvLyFBwHHA.4992@.TK2MSFTNGP04.phx.gbl...
> Hi Bill,
> Thank you for your reply. I am actually using SqlClient, I only created
> an ODBC connection to troubleshoot the problem.
> So basically, I can connect to the server through an ODBC connection
> (in the Data Sources in Windows), but when I try to use SqlClient to
> establish a connection, it fails. The connection string is something like
> this:
> "data source=servername;persist security info=True;initial
> catalog=databasename;user id=username;Trusted_Connection=yes"
> Once again, the error is "General Connection Error...[Microsoft][ODBC
> SQL Server Driver][DBNETLIB]ConnectionRead (rec())."
> It is very puzzling because this client doesn't seem to have anything
> different in his configuration.
> So far I haven't heard of any problems with .Net 2.0 and SQL Server
> 2005. Could it be .Net?
> Thanks,
> Maer
>
> "William (Bill) Vaughn" <billvaRemoveThis@.betav.com> wrote in message
> news:eCBwqunvHHA.1212@.TK2MSFTNGP05.phx.gbl...
>
|||Hi Bill,
Thank you so much for your help. I had read your articles which were
extremely helpful!
It turns out that the problem was that the client had an alias with an
invalid port. He insisted that the port was correct until I asked him to
indulge me and try the default 1433.
The funny thing is that when the port was invalid in the past, the error
I would usually get was something like "server does not exist." So this
error really threw me off.
Once again - thank you for your time.
Maer
"William (Bill) Vaughn" <billvaRemoveThis@.betav.com> wrote in message
news:eZBb2gLwHHA.484@.TK2MSFTNGP06.phx.gbl...
> Okay, User ID and Trusted Connection are mutually exclusive. Either your
> Windows ID is trusted or it's not. Did you read the whitepaper on
> connecting?
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ------
> "Maer" <maer@.auditleverage.com> wrote in message
> news:uuvLyFBwHHA.4992@.TK2MSFTNGP04.phx.gbl...
>

Connection error while already running code

I am using Access 2002 as a front end and SQL Server 2000 as a back end.
I am using an ODBC connection and TCP/IP
After I have connected, I use ADO to run a process that gets ten different
sum queries from various SQL Server tables and writes the results to local
Access table. This loops thru 300 to 800 records.
The second time thru this process, at any of the queries, I will almost
always get this error:
-2147467259, Sql Server does not exist or access denied. Now I am already
connected and I have run this same query many times.
If I debug and force the same line, it runs.
Why is it hanging occasionally, and more importantly, what can I do to fix
this?
TIA,
MikeCould be that the problem is timing related. What happens if you insert a
timer event to wait a few seconds prior to establishing a new connection?
What is the connection timeout setting? How many concurrent connections
are on the server when this happens?
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Kevin,
I am not establishing a new connection, I am using one that is already open.
The connection timeout is the default, 30 seconds.
The concurrent connection fluctuates between 159 and 175.
Hope this helps.
Mike
"Kevin McDonnell [MSFT]" <kevmc@.online.microsoft.com> wrote in message
news:dzu1LfLVEHA.2764@.cpmsftngxa10.phx.gbl...
> Could be that the problem is timing related. What happens if you insert a
> timer event to wait a few seconds prior to establishing a new connection?
> What is the connection timeout setting? How many concurrent connections
> are on the server when this happens?
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>

Connection error while already running code

I am using Access 2002 as a front end and SQL Server 2000 as a back end.
I am using an ODBC connection and TCP/IP
After I have connected, I use ADO to run a process that gets ten different
sum queries from various SQL Server tables and writes the results to local
Access table. This loops thru 300 to 800 records.
The second time thru this process, at any of the queries, I will almost
always get this error:
-2147467259, Sql Server does not exist or access denied. Now I am already
connected and I have run this same query many times.
If I debug and force the same line, it runs.
Why is it hanging occasionally, and more importantly, what can I do to fix
this?
TIA,
Mike
Could be that the problem is timing related. What happens if you insert a
timer event to wait a few seconds prior to establishing a new connection?
What is the connection timeout setting? How many concurrent connections
are on the server when this happens?
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
|||Kevin,
I am not establishing a new connection, I am using one that is already open.
The connection timeout is the default, 30 seconds.
The concurrent connection fluctuates between 159 and 175.
Hope this helps.
Mike
"Kevin McDonnell [MSFT]" <kevmc@.online.microsoft.com> wrote in message
news:dzu1LfLVEHA.2764@.cpmsftngxa10.phx.gbl...
> Could be that the problem is timing related. What happens if you insert a
> timer event to wait a few seconds prior to establishing a new connection?
> What is the connection timeout setting? How many concurrent connections
> are on the server when this happens?
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>

Saturday, February 25, 2012

Connection error after already connected

I am using Access 2002 as a front end and SQL Server 2000 as a back end.
After I have connected, I use ADO to run a process that gets ten different
sum queries from various SQL Server tables and writes the results to local
Access table. This loops thru 300 to 800 records.
The second time thru this process, at any of the queries, I will almost
always get this error:
-2147467259, Sql Server does not exist or access denied. Now I am already
connected and I have run this same query many times.
If I debug and force the same line, it runs.
Why is it hanging occasionally, and more importantly, what can I do to fix
this?
TIA,
Mike
Are you using named pipes or tcp/ip ?
Vikram
"Michael Beck" <mikeb@.Nospamamuletc.com> wrote in message
news:OxuPzTwTEHA.3336@.TK2MSFTNGP10.phx.gbl...
> I am using Access 2002 as a front end and SQL Server 2000 as a back end.
> After I have connected, I use ADO to run a process that gets ten different
> sum queries from various SQL Server tables and writes the results to local
> Access table. This loops thru 300 to 800 records.
> The second time thru this process, at any of the queries, I will almost
> always get this error:
> -2147467259, Sql Server does not exist or access denied. Now I am already
> connected and I have run this same query many times.
> If I debug and force the same line, it runs.
> Why is it hanging occasionally, and more importantly, what can I do to fix
> this?
> TIA,
> Mike
>
|||TCP/IP
"Vikram Vamshi" <vikram.vamshi@.nospam.com> wrote in message
news:efh1gyyTEHA.3180@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> Are you using named pipes or tcp/ip ?
> Vikram
> "Michael Beck" <mikeb@.Nospamamuletc.com> wrote in message
> news:OxuPzTwTEHA.3336@.TK2MSFTNGP10.phx.gbl...
different[vbcol=seagreen]
local[vbcol=seagreen]
already[vbcol=seagreen]
fix
>

Connection error after already connected

I am using Access 2002 as a front end and SQL Server 2000 as a back end.
After I have connected, I use ADO to run a process that gets ten different
sum queries from various SQL Server tables and writes the results to local
Access table. This loops thru 300 to 800 records.
The second time thru this process, at any of the queries, I will almost
always get this error:
-2147467259, Sql Server does not exist or access denied. Now I am already
connected and I have run this same query many times.
If I debug and force the same line, it runs.
Why is it hanging occasionally, and more importantly, what can I do to fix
this?
TIA,
MikeAre you using named pipes or tcp/ip ?
Vikram
"Michael Beck" <mikeb@.Nospamamuletc.com> wrote in message
news:OxuPzTwTEHA.3336@.TK2MSFTNGP10.phx.gbl...
> I am using Access 2002 as a front end and SQL Server 2000 as a back end.
> After I have connected, I use ADO to run a process that gets ten different
> sum queries from various SQL Server tables and writes the results to local
> Access table. This loops thru 300 to 800 records.
> The second time thru this process, at any of the queries, I will almost
> always get this error:
> -2147467259, Sql Server does not exist or access denied. Now I am already
> connected and I have run this same query many times.
> If I debug and force the same line, it runs.
> Why is it hanging occasionally, and more importantly, what can I do to fix
> this?
> TIA,
> Mike
>|||TCP/IP
"Vikram Vamshi" <vikram.vamshi@.nospam.com> wrote in message
news:efh1gyyTEHA.3180@.TK2MSFTNGP11.phx.gbl...
> Are you using named pipes or tcp/ip ?
> Vikram
> "Michael Beck" <mikeb@.Nospamamuletc.com> wrote in message
> news:OxuPzTwTEHA.3336@.TK2MSFTNGP10.phx.gbl...
different[vbcol=seagreen]
local[vbcol=seagreen]
already[vbcol=seagreen]
fix[vbcol=seagreen]
>

Friday, February 10, 2012

Connecting to SQL Server 2005 Express from a Remote Machine (using Named Instance)

Hi

I have Installed Microsoft SQL Server 2005 Express (Named Instance:=01HW050876\SQLEXPRESS) in my machine (OS : Windows XP). I am using ADO in Visual Basic 6 to connect to the database. I use SQL Server Authentication to connect to ther server. It works fine if I connect from my machine. However, if i try to connect from a different machine I get the following error:

Unhandled Error [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied

Here is my connection string:

Public Const CONNECT_STRING_SQL As String = "PROVIDER=SQLOLEDB.1;SERVER=01HW050876\SQLEXPRESS;UID=user;PWD=sqlpwd;DATABASE=SalesWindow"

I have also used the Ip address

Public Const CONNECT_STRING_SQL As String = "PROVIDER=SQLOLEDB.1;SERVER=xxx.xxx.xxx.xxx\SQLEXPRESS;UID=user;PWD=sqlpwd;DATABASE=SalesWindow"

The other computer is also in the same network and I was able to ping my machine from there. I have also set the login mode of the SQLServer to Mixed mode in the registry and have added the user from the other machine to the database and have given access rights.

Could you help me to track down the problem

Many thanks in Advance
Regards
Shasur

1. Enable TCP or/and Named Pipe for the sqlexpress instance.

2. Made exception in the firewall of your sqlexpress machine, the xp machine, for the sqlbrowser service and sqlexpress instance.

You can also take a look at the following blog,

http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx

Connecting to SQL Server 2005 Express from a Remote Machine (using Named Instance)

Hi

I have Installed Microsoft SQL Server 2005 Express (Named Instance:=01HW050876\SQLEXPRESS) in my machine (OS : Windows XP). I am using ADO in Visual Basic 6 to connect to the database. I use SQL Server Authentication to connect to ther server. It works fine if I connect from my machine. However, if i try to connect from a different machine I get the following error:

Unhandled Error [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied

Here is my connection string:

Public Const CONNECT_STRING_SQL As String = "PROVIDER=SQLOLEDB.1;SERVER=01HW050876\SQLEXPRESS;UID=user;PWD=sqlpwd;DATABASE=SalesWindow"

I have also used the Ip address

Public Const CONNECT_STRING_SQL As String = "PROVIDER=SQLOLEDB.1;SERVER=xxx.xxx.xxx.xxx\SQLEXPRESS;UID=user;PWD=sqlpwd;DATABASE=SalesWindow"

The other computer is also in the same network and I was able to ping my machine from there. I have also set the login mode of the SQLServer to Mixed mode in the registry and have added the user from the other machine to the database and have given access rights.

Could you help me to track down the problem

Many thanks in Advance
Regards
Shasur

1. Enable TCP or/and Named Pipe for the sqlexpress instance.

2. Made exception in the firewall of your sqlexpress machine, the xp machine, for the sqlbrowser service and sqlexpress instance.

You can also take a look at the following blog,

http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx