how to connect to cqcm by using pyodbc

287 Views Asked by At
  1. I was trying to connect to clearquest by using pyodbc and getting the following error...

connection = pyodbc.connect('DSN=ClearQuest;PWD=systest1') pyodbc.Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')

  1. When i tried to print datasources available in the system then the following available datasources are printing.

{'MS Access Database': 'Microsoft Access Driver (*.mdb, .accdb)', 'dBASE Files': 'Microsoft Access dBASE Driver (.dbf, *.ndx, .mdx)', 'Excel Files': 'Microsoft Excel Driver (.xls, *.xlsx, *.xlsm, *.xlsb)'}

Can anyone help me with this error??

1

There are 1 best solutions below

0
On

If you don't have a DSN defined in the "ODBC Data Source Administrator" then you must provide all connection information in the connection string: driver name, host name, etc.

Refer to DSN-less Connections in the pyodbc documentation. It doesn't have specifics for ClearQuest, though.

I have no experience with ClearQuest so you should have a look at its documentation. A quick search gave me this: