Showing posts with label performs. Show all posts
Showing posts with label performs. Show all posts

Sunday, March 11, 2012

connection from windows mobile 5.0

Hi,
I have written some software for a windows mobile 5.0 device that
connects to a sql server directly and performs various operations
against a database.
Under sql server 2000 and XP, I had no problems doing this using
ActiveSync and/or via wireless tcp connections with a vpn connection
to the desktop.
However, since I switched to MS Vista and SQL Server 2005 (Developers
Edition), I can only connect while using Mobile Device Center
(ActiveSync).
What's confusing to me is that when I am connected wirelessly using a
VPN connection to the Vista machine, I'm on the same subnet as the
desktop/SQL Server. While using ActiveSync (MDC), I'm on a completely
different subnet. SQL Server connections function fine through
ActiveSync, but not over the VPN.
How do I configure SQL Server to allow these wireless/vpn connections?
Is this even a SQL Server setting?
Thanks for any and all help.
Charlie
Ok. I figured it out. My device is not resolving the host name
correctly. I configured the connection string to use the IP address
and it connects fine.
Thanks,
Charlie

connection from windows mobile 5.0

Hi,
I have written some software for a windows mobile 5.0 device that
connects to a sql server directly and performs various operations
against a database.
Under sql server 2000 and XP, I had no problems doing this using
ActiveSync and/or via wireless tcp connections with a vpn connection
to the desktop.
However, since I switched to MS Vista and SQL Server 2005 (Developers
Edition), I can only connect while using Mobile Device Center
(ActiveSync).
What's confusing to me is that when I am connected wirelessly using a
VPN connection to the Vista machine, I'm on the same subnet as the
desktop/SQL Server. While using ActiveSync (MDC), I'm on a completely
different subnet. SQL Server connections function fine through
ActiveSync, but not over the VPN.
How do I configure SQL Server to allow these wireless/vpn connections?
Is this even a SQL Server setting?
Thanks for any and all help.
CharlieOk. I figured it out. My device is not resolving the host name
correctly. I configured the connection string to use the IP address
and it connects fine.
Thanks,
Charlie

Friday, February 24, 2012

Connection closes abruptly

My application consists of two modules, one in VB6, which performs Inserts and Updates on an SQL Express Server, and the other in VB.NET which performs Select operations on the same server.

From last two days the .NET module (which performs heavy select queries), randomly gives an error : "Connection closed for this operation", and rarely gives an error : "SqlException: A severe error occurred on the current command".

I don't know whether these two errors are linked to each other. But the former error is a very high priority for me, as it is application wide.

This problem is occuring only in the .NET module. The VB6 module which uses the same server is working fine.

Please help.

Girish

Hi Girish,

It sounds like you're trying to open a connection once and then just leave it open all the while the application is running. You probably shouldn't do this, rather, you should only open the connection when you are activly querying against it. You can certainly run a number of queries in a row against the same connection, but once your immediate need for the connection is past, you should close it.

Connection pooling in .NET and SQL 2005 will automatically manage having connections available to you when you need to re-open them for the next batch of queries. My guess is that if you maintain your connection for shorter times, you'll problem with the connection closing will go away.

You might also consider asking this question on the .NET Data Access forum to see if that group has additional ideas.

Regards,

Mike Wachal
SQL Express team

-
Mark the best posts as Answers!

|||

Hi Girish,

Any luck with this issue?

Mike