Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3756570
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:52:20+00:00 2026-05-19T09:52:20+00:00

I am able to connect to server with mssql management studio but not able

  • 0

I am able to connect to server with mssql management studio but not able to connect using python I think some problem in connection string please help below is string I am using.

import pyodbc as p

connStr = ( r'DRIVER={SQL Server};Server=ip; Network=DBMSSOCN;Initial Catalog=' + database + ';User ID=' + id +';Password=' + pass1 +';Trusted_Connection=True' +';')

conn = p.connect(connStr)

error is like below

 conn = p.connect(connStr)
pyodbc.Error: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][TCP/IP Sock
ets]SQL Server does not exist or access denied. (17) (SQLDriverConnectW); [01000
] [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen (Connect()).
 (10060); [01S00] [Microsoft][ODBC SQL Server Driver]Invalid connection string a
ttribute (0)')
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T09:52:21+00:00Added an answer on May 19, 2026 at 9:52 am

    After lots of trial and error this string ended up working:

    connStr = ('DRIVER={SQL Server Native Client 10.0};Server=ip;port=port;Network Library=DBMSSOCN;Database=TEST;uid=id;pwd=pass;')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not able to connect a simple client and a simple server. When I
I am able to connect to an Oracle database using several tools, but am
I was able to connect to MSSQL 2008 express on local machine using SQL
I have a problem establishing connection with Server Explorer in Visual Studio 2012 Ultimate
I have mysql DB on cloud linux server. I am able to connect db
I'm getting an exception from Cruise Control about not being able to connect to
I am trying to connect to SQL Server 2008 (not express) with PHP 5.2.9-2
Recently few days I run into a weird problem of php not able to
My problem started off with me not being able to log in as root
I have connected sqlserver using ODBC in php. I'm able to connect the database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.