SV: sql server connection
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-sqlclient' list.


=?iso-8859-1?Q?Andr=E9_Colbi=F6rnsen?=
I thought a SQL server connection string should look like this:

Dim objConn As New
SqlConnection("Server=3Dsqlserver.quotamais.com.br;UID=3Dquotamais;PWD=3D=
webQ2
602";Database=3Dquotamais)

Regards/Halsningar

Andre Colbiornsen
--------------------------------------
Sonnenburg Communications
Bergsgatan 3,
SE-211 54 Malm=F6
Sweden
Tel.: +46-(0)40-97 78 80
Fax.: +46-(0)40-97 78 80
Mob.: +46-(0)708-97 78 79
Mail: Click here to reveal e-mail address
Web.: www.sonnenburg.se
----------------------------------------
B2B Web Solutions - Specializing in .Net
----------------------------------------

-----Ursprungligt meddelande-----
Fr=E5n: Giovani [mailto:Click here to reveal e-mail address]=20
Skickat: den 11 juli 2002 18:18
Till: ngfx-sqlclient
=C4mne: [ngfx-sqlclient] sql server connection

-- Moved from [aspngfreeforall] to [ngfx-sqlclient] by Tony Stark
<Click here to reveal e-mail address> --

I=B4m trying to make a connection with sql server. Follow the code:

Dim objConn As New SqlConnection("Server =3D sqlserver.quotamais.com.br; =

Database =3D quotamais; User ID =3D quotamais; Password =3D webQ2602")

Dim strSql As String =3D "SELECT id FROM adm_user WHERE login =3D =
@userName
AND=20
senha =3D @password"

Dim objCmd As New SqlCommand(strSql, objConn)

objConn.Open()

The error message that I receive when the Open method is executed is:

"SQL Server does not exist or access denied."

Do I need to add more information on ConnectionString?

Giovani.
| [ngfx-sqlclient] member Click here to reveal e-mail address =3D YOUR ID=20
| http://www.aspfriends.com/aspfriends/ngfx-sqlclient.asp =3D JOIN/QUIT

Reply to this message...
 
    
Graham Dobson
I could be way off here but usually I see the string looking like this "Data
Source=servername;Database=pubs;UID=sa;pwd=;". It seems to me you have a
partial url for your server name. Does this mean you are using http to try
and access SQL server? The SQLClient .NET access is through SQL Server's
native tabular data stream protocol so I think this would be problematic. I
haven't seen SQL server exposing it's data store or native protocol in this
way (over http) before.

Graham

-----Original Message-----
From: André Colbiörnsen [mailto:Click here to reveal e-mail address]
Sent: Friday, July 12, 2002 3:52 AM
To: ngfx-sqlclient
Subject: [ngfx-sqlclient] SV: sql server connection

I thought a SQL server connection string should look like this:

Dim objConn As New
SqlConnection("Server=sqlserver.quotamais.com.br;UID=quotamais;PWD=webQ2
602";Database=quotamais)

Regards/Halsningar

Andre Colbiornsen
--------------------------------------
Sonnenburg Communications
Bergsgatan 3,
SE-211 54 Malmö
Sweden
Tel.: +46-(0)40-97 78 80
Fax.: +46-(0)40-97 78 80
Mob.: +46-(0)708-97 78 79
Mail: Click here to reveal e-mail address
Web.: www.sonnenburg.se
----------------------------------------
B2B Web Solutions - Specializing in .Net
----------------------------------------

-----Ursprungligt meddelande-----
Från: Giovani [mailto:Click here to reveal e-mail address]
Skickat: den 11 juli 2002 18:18
Till: ngfx-sqlclient
Ämne: [ngfx-sqlclient] sql server connection

-- Moved from [aspngfreeforall] to [ngfx-sqlclient] by Tony Stark
<Click here to reveal e-mail address> --

I´m trying to make a connection with sql server. Follow the code:

Dim objConn As New SqlConnection("Server = sqlserver.quotamais.com.br;
Database = quotamais; User ID = quotamais; Password = webQ2602")

Dim strSql As String = "SELECT id FROM adm_user WHERE login = @userName
AND
senha = @password"

Dim objCmd As New SqlCommand(strSql, objConn)

objConn.Open()

The error message that I receive when the Open method is executed is:

"SQL Server does not exist or access denied."

Do I need to add more information on ConnectionString?

Giovani.
| [ngfx-sqlclient] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-sqlclient.asp = JOIN/QUIT

| [ngfx-sqlclient] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-sqlclient.asp = JOIN/QUIT

Reply to this message...
 
    
Peter Brunone

    No, the framework would most likely say that the connection string was
malformed.

    Giovani, are you trying to access this SQL Server through a firewall or
proxy/router? If so, make sure that the correct port (usually 1433) is
open. Also, make sure that TCP/IP is enabled (NOT just Named Pipes) in
Start->Programs->Server Network Utility.

Regards,

Peter

|-----Original Message-----
|From: André Colbiörnsen [mailto:Click here to reveal e-mail address]
|
|I thought a SQL server connection string should look like this:
|
|Dim objConn As New
|SqlConnection("Server=sqlserver.quotamais.com.br;UID=quotamais;PWD=webQ2
|602";Database=quotamais)
|
|Regards/Halsningar
|
|Andre Colbiornsen
|
|-----Ursprungligt meddelande-----
|Från: Giovani [mailto:Click here to reveal e-mail address]
|
|I´m trying to make a connection with sql server. Follow the code:
|
|
|Dim objConn As New SqlConnection("Server = sqlserver.quotamais.com.br;
|Database = quotamais; User ID = quotamais; Password = webQ2602")
|
|Dim strSql As String = "SELECT id FROM adm_user WHERE login = @userName
|AND
|senha = @password"
|
|Dim objCmd As New SqlCommand(strSql, objConn)
|
|objConn.Open()
|
|
|The error message that I receive when the Open method is executed is:
|
|"SQL Server does not exist or access denied."
|
|
|Do I need to add more information on ConnectionString?
|
|Giovani.

Reply to this message...
 
    
Minh Truong
[Original message clipped]

(*** to protect the innocent)

This wouldn't be your ACTUAL connection information, would it?

Reply to this message...
 
 
System.Data.SqlClient.SqlCommand
System.Data.SqlClient.SqlConnection




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com