Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Operation error #5

Open
Joemuchiri2 opened this issue Oct 31, 2023 · 2 comments
Open

Operation error #5

Joemuchiri2 opened this issue Oct 31, 2023 · 2 comments

Comments

@Joemuchiri2
Copy link

OperationalError Traceback (most recent call last)
c:\Users\Admin\OneDrive\LP1\Untitled-1.ipynb Cell 3 line 1
----> 1 connection = pyodbc.connect(connection_string)
3 query="Select * from dbo.LP2_Telco_churn_first_3000"
4 data=pd.read_sql(query,connection)

OperationalError: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (17) (SQLDriverConnect); [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). (53)')

I'm getting this error how should I handle it

@coderacheal
Copy link
Owner

coderacheal commented Oct 31, 2023

@Joemuchiri2, please check your .env file and make sure that you have set the correct environment variables like server name, database name, login, etc. I have tried it and it works. Alternatively, please make sure your internet is strong, and that is not the problem

To cross-check

  • Please check the credentials in your .env file.
  • Put your values in the quotation.
  • Also, make sure the connection string is complete. Try to use the same variable names as the ones in the notebook. You can change them once you have been able to access the data

@Joemuchiri2
Copy link
Author

InterfaceError Traceback (most recent call last)
c:\Users\Admin\OneDrive\LP1\Untitled-1.ipynb Cell 3 line 1
----> 1 connection = pyodbc.connect(connection_string)
3 query="Select * From dbo.LP1_startup_funding2020"
4 data=pd.read_sql(query,connection)

InterfaceError: ('28000', "[28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'LP1_learner'. (18456) (SQLDriverConnect); [28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'LP1_learner'. (18456)")

Now I'm getting this error

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants