{"action":"created","issue":{"url":"https://api.github.com/repos/mkleehammer/pyodbc/issues/407","repository_url":"https://api.github.com/repos/mkleehammer/pyodbc","labels_url":"https://api.github.com/repos/mkleehammer/pyodbc/issues/407/labels{/name}","comments_url":"https://api.github.com/repos/mkleehammer/pyodbc/issues/407/comments","events_url":"https://api.github.com/repos/mkleehammer/pyodbc/issues/407/events","html_url":"https://github.com/mkleehammer/pyodbc/issues/407","id":334108314,"node_id":"MDU6SXNzdWUzMzQxMDgzMTQ=","number":407,"title":"Python pyodbc cursor.columns error on old MS access(1995) ","user":{"login":"VagosGrigoropoulos","id":39879424,"node_id":"MDQ6VXNlcjM5ODc5NDI0","avatar_url":"https://avatars3.githubusercontent.com/u/39879424?v=4","gravatar_id":"","url":"https://api.github.com/users/VagosGrigoropoulos","html_url":"https://github.com/VagosGrigoropoulos","followers_url":"https://api.github.com/users/VagosGrigoropoulos/followers","following_url":"https://api.github.com/users/VagosGrigoropoulos/following{/other_user}","gists_url":"https://api.github.com/users/VagosGrigoropoulos/gists{/gist_id}","starred_url":"https://api.github.com/users/VagosGrigoropoulos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VagosGrigoropoulos/subscriptions","organizations_url":"https://api.github.com/users/VagosGrigoropoulos/orgs","repos_url":"https://api.github.com/users/VagosGrigoropoulos/repos","events_url":"https://api.github.com/users/VagosGrigoropoulos/events{/privacy}","received_events_url":"https://api.github.com/users/VagosGrigoropoulos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-20T14:34:09Z","updated_at":"2018-06-25T16:50:44Z","closed_at":null,"author_association":"NONE","body":"Please first make sure you have looked at:\r\n\r\n* Documentation: https://github.com/mkleehammer/pyodbc/wiki\r\n* Other issues\r\n\r\n### Environment\r\n\r\nTo diagnose, we usually need to know the following, including version numbers.  On Windows, be\r\nsure to specify 32-bit Python or 64-bit:\r\n\r\n- Python: 3.6.3 (x32)\r\n- pyodbc: 4.0.23(x32)\r\n- OS: Windows 2010(x64)\r\n- DB:MS office access 1995(mdb file)\r\n- MS office access 2010(x32)\r\n\r\n### Issue\r\n\r\nI try to parse  an old ms access database(1995)(x32) and i had various problems.I can connect to it and the first issue was that i could't make cursor.execute due to known issue permission to mSys etc..\r\nSo i made the schema approach and at first all was good(can print table names) but when it comes to cursor.columns i can't get any value(my db has 7 dables and each has about 8 columns).My code is here:\r\n    \r\n    import pyodbc\r\n    import os\r\n\r\n    dir_script = os.path.dirname(os.path.join(__file__,\"../../..\"))\r\n    dir_script = dir_script.replace(\"\\\\\",\"/\")\r\n    connection  = pyodbc.connect(r'DRIVER={Microsoft Access Driver (*.mdb)};DBQ=%s;'%(dir_script+\"/databases/fms-800/HAF-1_1807.mdb\"))\r\n    connection.setdecoding(pyodbc.SQL_CHAR, encoding='utf-8')\r\n    connection.setdecoding(pyodbc.SQL_WCHAR, encoding='utf-8')\r\n    connection.setencoding(encoding='utf-8')\r\n    #until here all fine\r\n    cursor = connection.cursor()\r\n    #this works\r\n    tableNames = [x[2] for x in cursor.tables().fetchall() if x[3] == 'TABLE']\r\n    print (tableNames)\r\n    #this works too    \r\n    for row in cursor.tables(table='Primary'):\r\n        print (row.table_name)\r\n    #this does nothing with no error and no newline\r\n    for row in cursor.columns(table='Primary'):\r\n        print(row.column_name)\r\n    #and here i want to take some data searching on specific columns\r\n\r\n    #note that i can't even modify the access to newer version as it is for aviation purpuses.\r\nSearching for days in internet someone said that on old ms access databases row should be row[3] but this didn't worked too.\r\nThx in advance\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mkleehammer/pyodbc/issues/comments/400020249","html_url":"https://github.com/mkleehammer/pyodbc/issues/407#issuecomment-400020249","issue_url":"https://api.github.com/repos/mkleehammer/pyodbc/issues/407","id":400020249,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDAyMDI0OQ==","user":{"login":"v-chojas","id":25211973,"node_id":"MDQ6VXNlcjI1MjExOTcz","avatar_url":"https://avatars2.githubusercontent.com/u/25211973?v=4","gravatar_id":"","url":"https://api.github.com/users/v-chojas","html_url":"https://github.com/v-chojas","followers_url":"https://api.github.com/users/v-chojas/followers","following_url":"https://api.github.com/users/v-chojas/following{/other_user}","gists_url":"https://api.github.com/users/v-chojas/gists{/gist_id}","starred_url":"https://api.github.com/users/v-chojas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/v-chojas/subscriptions","organizations_url":"https://api.github.com/users/v-chojas/orgs","repos_url":"https://api.github.com/users/v-chojas/repos","events_url":"https://api.github.com/users/v-chojas/events{/privacy}","received_events_url":"https://api.github.com/users/v-chojas/received_events","type":"User","site_admin":false},"created_at":"2018-06-25T16:50:44Z","updated_at":"2018-06-25T16:50:44Z","author_association":"CONTRIBUTOR","body":"Which ODBC driver are you using? This seems related to SQLColumns() API.\r\n\r\nProviding an ODBC trace will also help."}}
{"actor":{"display_login":"v-chojas"}}