Showing posts with label connects. Show all posts
Showing posts with label connects. Show all posts

Sunday, March 25, 2012

Connet to SQL using VB6 forms via Internet

We have one system that is developed using Visual Basic 6. The system connects to MS SQL database using ODBC configuration. We have another branch that has to access the same database. We've got an Internet connection with a speed of 2MB, as we tried to connect using Virtual Private Network (VPN), but the problem we faced that the system became very slow over the Internet, its taking half an hour to open one form. Is there any way to connect to the database and via the Internet using VB6 Forms? Or its not useful as its not a web based tool.

Hi,

it′s hard for us to tell where the bottleneck in your application design is. But as of your description the application is not designed for slow connections to the database. To find out exactly what your problem is, you will either have to through the code to see which data is requested from the server, or let the profiler runn to see where the latency is based on.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Connects but network error, Im behind Wingate

Hello.

I'm trying to connect to SQL Server using Enterprise manager. I'm behind a Wingate proxy.

I've configured an alias using TCP/IP, pointing to the (local network) IP of the Wingate box.

On the Wingate box I've set a TCP Mapping service on port 1433, pointing to the IP of the remote SQL Server on port 1433 too.

The error message is:
General network error. Changed language settings to us-english. ConnectionRead(Error SIO_KEEPALIVE_VALS())..

I assume at least *something* is right, as if I change the password to a bogus one I get "Login failed" instead of this network error.

Hope someone can point me in the right direction. Thanks,
- ManuelYou probably need to enable UDP port 1434 as well. See MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_1_server_1zuc.asp) for a more complete explaination.

-PatP|||Hello.

Just added UDP mapping on 1434. Same error.

Read the MSDN article but couldn't figure what else to try. Just in case I didn't make myself clear, I'm trying to connect to a server outside my local network (as opposed to enabling a server on my network to be seen on the internet).

How can I debug this forward? What else can I do?

Thanks again,
- Manuel|||Check the Wingate log, and look to see what traffic is blocked from the workstation headed toward the server's IP address. It should be on port 1433 unless you are using a named instance of SQL Server, but look for anything, just in case.

Triple check to be sure that your Client Network Settings (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_1_client_7v03.asp) and the server's Server Network Settings (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_1_server_2epl.asp) are compatible, especially if they are using a Proxy (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_1_server_1y5u.asp).

-PatP|||As referred by Pat ensure both client & server's netlibs are similar, by chance are you running on cluster?

Try to use Named-pipes instead of Tcp/IP.

Information about Orphaned sessions (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_rptconsetup_5gmr.asp) from this mSDN link.

HTH

Monday, March 19, 2012

ConnectionOpen (PreLoginHandshake()). General Network Error

Hi all,
I'm getting the following error on my SQL on a local machine when running a
client program that connects to sql server located at the same machine. What
does it means? Do i have to configure in SQL settings?
[DBNETLIB]ConnectionOpen (PreLoginHandshake()). General Network Error.
thanks,
joelNormally this message would indicate a timeout of some kind attempting to
connect. Open the SQL Client Network Utility and see if Shared Memory is
enabled. If it is not enable it and see if the problem goes away. Local
connections by default should use shared memory so it would appear that
this is not enabled.
Rand
This posting is provided "as is" with no warranties and confers no rights.

Sunday, March 11, 2012

Connection to SQL Server with network login id when not logged

I have a scheduled task that executes a program that, among other
stuff, every morning connects to a SQL Server that requires a login by
network login id. The problem is that, even if that scheduled task runs
as the network user, it doesn't work if that user is not logged on.
Is it any way to make ir connect when not logged?
Thanks in advance.
By "scheduled task" I assume that to mean that it is set to run using SQL
Agent. If so, then you need to assign the SQL Agent service to run as a
specific windows domain id and that id in turn needs to be granted access to
your SQL Server instance and database(s).
--Brian
(Please reply to the newsgroups only.)
<axl@.todojuegos.com> wrote in message
news:1123149165.623223.184430@.g44g2000cwa.googlegr oups.com...
> I have a scheduled task that executes a program that, among other
> stuff, every morning connects to a SQL Server that requires a login by
> network login id. The problem is that, even if that scheduled task runs
> as the network user, it doesn't work if that user is not logged on.
> Is it any way to make ir connect when not logged?
> Thanks in advance.
>

Connection to SQL Server with network login id when not logged

I have a scheduled task that executes a program that, among other
stuff, every morning connects to a SQL Server that requires a login by
network login id. The problem is that, even if that scheduled task runs
as the network user, it doesn't work if that user is not logged on.
Is it any way to make ir connect when not logged?
Thanks in advance.By "scheduled task" I assume that to mean that it is set to run using SQL
Agent. If so, then you need to assign the SQL Agent service to run as a
specific windows domain id and that id in turn needs to be granted access to
your SQL Server instance and database(s).
--Brian
(Please reply to the newsgroups only.)
<axl@.todojuegos.com> wrote in message
news:1123149165.623223.184430@.g44g2000cwa.googlegroups.com...
> I have a scheduled task that executes a program that, among other
> stuff, every morning connects to a SQL Server that requires a login by
> network login id. The problem is that, even if that scheduled task runs
> as the network user, it doesn't work if that user is not logged on.
> Is it any way to make ir connect when not logged?
> Thanks in advance.
>

Connection To SQL Server 2005 / 2000

Hi everybody,
I got a bit of a problem with my connection. I wrote a programm in VB.Net wich connects to a sql-server 2005. On my local Computer everything works great, but on another Computer in the Network, I just receving timeouts. I allready check, if the sever allows remote connection.
My connectionstring for the SQL connection looks like this:

"Initial Catalog=Bauvorhaben;Data Source=P4-2400\SQLEXPRESS;Password=?;Persist Security Info=True;User ID=Lars"

I allready tried to get an connection to SQL-Server 2000. But the same here.

Does somebody have a clue, why I can't connect?

Thanks,
Lars

By default SQLExpress do not allow remote conneciton.

You need to

1. Turn on remote connection using SQL Server configuration Manager.

2. Start sqlbrowser service that is collocated with the SQLExpress server. SQL Browser service is needed if the sqlserver is a name instance, such as sqlexpress.

3. Make sure you make exception for sqlservr.exe in the firewall configuration of windows.

http://blogs.msdn.com/sql_protocols/archive/2005/11/14/492616.aspx

Wednesday, March 7, 2012

Connection timeout/ODBC failed

Dear All,
I am working on a VBA (MS Access) application, which connects Remote
SQL Server by ODBC Connection. When I open this application on my
workstation the error "Connection timeout' or "ODBC - failed"
will occur, But when I open it on the remote desktop it will run.
Can you suggest me what is going wrong.
Regards,
ShitalPerhaps you are blocked by port or by IP address. Typically, SQL Server
inside a network is not exposed to the outside world directly unless it
needs to be.
Can you connect to the remote SQL Server using Enterprise Manager or Query
Analyzer?
"rock" <khandar@.gmail.com> wrote in message
news:1150108297.418689.286870@.y43g2000cwc.googlegroups.com...
> Dear All,
> I am working on a VBA (MS Access) application, which connects Remote
> SQL Server by ODBC Connection. When I open this application on my
> workstation the error "Connection timeout' or "ODBC - failed"
> will occur, But when I open it on the remote desktop it will run.
> Can you suggest me what is going wrong.
> Regards,
> Shital
>

Saturday, February 25, 2012

connection string with authenticated user info

Hi. New to ASP.NET and first time posting.

My web app connects to a SQL database - SQL authentication.

Users login to the web app through the login server control. Once authenticated, it is my understanding that the user name and password are stored on the client as a cookie.

How do you programmatically get this user info and use it for the userid and password parameters of the connection string?

Is there a better way to use the authenticated user info to access a SQL database?

Thanks

Once authenticated (using asp.net login control), you can get the user info programmatically using:

Page

.User.Identity ( for example,Page.User.Identity.Name returns the username )|||

Thanks for the info.

I did some reading on Page.User.Identity, but don't understand how to get the password used for login. I need both the username and password to authenticate in SQL server.