ODBC connection works, but connection string doesn't

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm testing an app at work, the app is installed appropriately on the server
and the SQL Server is on my laptop.
I've gotten a test ODBC to connect to my laptop (using named pipes)
but the connection string which I have in a Web.Config file, isn't working.

I don't know how much the summary of an ODBC connection setup could help
this but I provided it anyway:

Here is my connection string: (the odbc test summary is below)

<add key="SQLConn"
value = "Data Source=##.###.##.###;Network=dbnmpntw;Initial Catalog=
Membership;User=jonefer;Password=12345; " />
</appSettings>

'==========odbc connection succeeded summary======
Data Source Name: CODATesting
Data Source Description: Testing SQL Server
Server: <IP Address>
Database: Membership
Language: (Default)
Translate Character Data: Yes
Log Long Running Queries: No
Log Driver Statistics: No
Use Integrated Security: No
Use Regional Settings: No
Prepared Statements Option: Drop temporary procedures on disconnect
Use Failover Server: No
Use ANSI Quoted Identifiers: Yes
Use ANSI Null, Paddings and Warnings: Yes
Data Encryption: No

Thanks for help anyone can offer.
 
jonefer said:
I'm testing an app at work, the app is installed appropriately on the
server
and the SQL Server is on my laptop.
I've gotten a test ODBC to connect to my laptop (using named pipes)
but the connection string which I have in a Web.Config file, isn't
working.

I don't know how much the summary of an ODBC connection setup could help
this but I provided it anyway:

Here is my connection string: (the odbc test summary is below)

<add key="SQLConn"
value = "Data Source=##.###.##.###;Network=dbnmpntw;Initial Catalog=
Membership;User=jonefer;Password=12345; " />
</appSettings>

Named pipes has Windows connection-level security. Try TCP/IP instead.

David
 
Doesn't work either - these are my latest tries (I even switched the port to
1521 to make sure) - and then I also tried using the Named Pipes Network
Library - DBNMPNTW

"Data Source=##.###.##.###;Network Library=DBMSSOCN;Initial
Catalog=Membership;User=jonefer;Password=12345;"

"Data Source=##.###.##.###:1521;Network Library=DBMSSOCN;Initial
Catalog=Membership;User=jonefer;Password=12345;"

"Data Source=##.###.##.###,1521;Network Library=DBMSSOCN;Initial
Catalog=Membership;User=jonefer;Password=12345;"

"np:Data Source=##.###.##.###;Initial
Catalog=Membership;User=jonefer;Password=12345;"

"Data Source=##.###.##.###;Network Library=DBNMPNTW;Initial
Catalog=Membership;User=jonefer;Password=12345;"
 
Ah, why are you wasting your time using ODBC to connect to SQL Server? Why
not use the native SQL Client or SqlClient?

--
____________________________________
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.
__________________________________
 
please please.
I'm not trying to waste time - I do have a SQL Client string, but it's not
working - so I used ODBC to test if I could even connect.

Didn't you read through? I have an ASP.NET app that works, but now that
I've connected it to the real IIS server and trying to connect back to my
laptop whose OS is XP (yes, that's all I have right now)

I keep getting an Acces Denied. - My firewall is open to port 1433 and I
even specified my own - 1521 just to be rediculous - but it's not working.
I can't understand why ODBC will let me through.
 
Let's see your broken SqlClient connection string. Did you go through the
checklist on my blog?

--
____________________________________
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.
__________________________________
 
it was at the top of this post - as well as at the bottom of this post -
but ok - here it is again:

<add key="SQLConn"
value = "Data Source=##.###.##.###;Network=dbnmpntw;Initial Catalog=
Membership;User=jonefer;Password=12345; " />
</appSettings>
 
it was at the top of this post - as well as at the bottom of this post -
but ok - here it is again:

<add key="SQLConn"
value = "Data Source=##.###.##.###;Network=dbnmpntw;Initial Catalog=
Membership;User=jonefer;Password=12345; " />
</appSettings>
 
We're all very busy--sorry for the oversight. Ok, I don't know why ODBC was
able to connect using Named Pipes but IIRC you need TCP/IP protocol to
connect to an IP address. I would also suspect you need to address the SQL
Server instance port as in "Data Source=xxx.xxx.xxx.xxx:1579;"

--
____________________________________
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.
__________________________________
 
Back
Top