cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to SQL server database using pyodbc in testcomplete

SOLVED
Highlighted
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
Highlighted
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

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

1 REPLY 1
Highlighted
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

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

Changing options from outside of TestComplete

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!