cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to SQL server database using pyodbc in testcomplete

SOLVED
Occasional Visitor

Connecting to SQL server database using pyodbc in testcomplete

I have installed pyodbc in my machine. Also, I have viewed the solution for including python libraries in test complete and written below code,

 

 

from os import sys
sys.path.insert(0, "C:\\Users\\UserName\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\site-packages")
import pyodbc

 

But still I am getting  ModuleNotFoundError: No module named 'pyodbc'. So, I can understand the above solution will work only for including simple libraries(.py files). But for modules like pyodbc kindly suggest some solution. And also i know we can able to do through ADO object but, we are preferred much on  pyodbc.  

 

Any help will be appreciated,

thanks in advance.

@naveens33

 

Note: please find the attached screenshot of the file location "C:\\Users\\UserName\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\site-packages"

1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: Connecting to SQL server database using pyodbc in testcomplete

Hi @naveens33,

What Python37 means in your path? If this is a python version (3.7), TestComplete supports Python 3.6.0. 

Please refer to Python - Specifics of Usage  help topic for more information.

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

1 REPLY 1
Community Manager

Re: Connecting to SQL server database using pyodbc in testcomplete

Hi @naveens33,

What Python37 means in your path? If this is a python version (3.7), TestComplete supports Python 3.6.0. 

Please refer to Python - Specifics of Usage  help topic for more information.

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors