ox-it / ords

Automatically exported from code.google.com/p/ords
0 stars 0 forks source link

Can't open data tables in Access databases with previously created ODBC connections #780

Open MerielP opened 8 years ago

MerielP commented 8 years ago

I have a number of Access databases from which I've set up ODBC connections to ORDS databases. Before today, the most recent of these was created on Wednesday this week (i.e. two days ago).

When I go back to these Access databases and try to reopen the data tables, I can't. I get this error message, which doesn't tell me very much:

odbc connection error message

I'm not prompted for any additional information (such as my password); it just fails.

This happens with all my previously created Access databases which are trying to pull data from ORDS via and ODBC connection, including the one I set up on Wednesday (which was definitely working then). The only database that I can currently access is the one that I set up an ODBC connection to this afternoon. That's working (subject to the bug reported in issue #779), so I'm fairly sure this isn't just a general problem with ODBC such as needing to reset my password.

MerielP commented 8 years ago

It transpires that closing and reoping Access is sufficient to stop an ODBC connection working. The connections I set up earlier today are now giving me the same error message as older ones.

thestoat commented 8 years ago

Does this happen on dev? I don't have Access so cannot check, but please do the following (on dev):

  1. Set up ODBC and ensure it works
  2. Note the exact time
  3. Close then reopen access
  4. Check the problem happens
  5. Let me know the time you recorded.
MerielP commented 8 years ago

I've just set up an ODBC connection to 'Club membership database' in the project 'Victorian Gentlemen's Clubs' on Dev. I achieved this at 7.12pm.

I checked to make sure I could view the contents of all the tables (I could), and edited a record. This seemed to work fine.

I then closed and reopened Access, and as before, couldn't access any of my tables. This happened at 7.16pm.

thestoat commented 8 years ago

Please provide explicit instructions on how you have set this up on Access so that I can try to reproduce.

thestoat commented 8 years ago

Ok - here is the dreaded "works for me" response. I created a connection to main_545846_545844 using my credentials, made sure I could read the data, saved these details and closed access. I then reopened access and looked at this database. I was asked for my user name and password (the other had been saved). I duly entered these and was again able to view the data. If this is what you did then ...

  1. Please try again. Maybe something has changed. If the problem persists, then ...
  2. Try using the CISCO VPN. I am pretty sure there are still problems with the database IP trigger that I need to get Sysdev to fix, but from what I have seen those problems don't now happen when using the VPN since Mike sorted that. If the problem still persists then it would be useful to see what the command line client makes of this. Navigate to http://www.enterprisedb.com/products-services-training/pgdownload#windows, download the latest stable version (Version 9.5.3 at the time of typing) for your OS and let type on a command line

psql.exe -U -h ords-application-database-04.ords.ox.ac.uk main_545846_545844

(note capital 'U' and small 'h'). psql.exe is probably located in something like "Program Files\PostgreSQL\9.5\bin".

When you run this, it should prompt for your password and succeed. If it doesn't succeed, it should at least give you a useful warning message.

Let me know ...

MerielP commented 8 years ago

Unfortunately, it's still not working for me. (I've tried on both dev and staging, and get the same results in both places.)

I'm afraid I don't know how to try this using the CISCO VPN - please could you supply instructions? (I'm not actually certain whether I can do this using a CONNECT machine, but I'll have a go!)

thestoat commented 8 years ago

In the first instance please try using the command line client. There is an omission in the instructions above so the instructions are:

Navigate to http://www.enterprisedb.com/products-services-training/pgdownload#windows, download the latest stable version (Version 9.5.3 at the time of typing) for your OS and let type on a command line

psql.exe -U -h ords-application-database-04.ords.ox.ac.uk main_545846_545844

(note capital 'U' and small 'h'). psql.exe is probably located in something like "Program Files\PostgreSQL\9.5\bin".

When you run this, it should prompt for your password and succeed. If it doesn't succeed, it should at least give you a useful warning message.

MerielP commented 8 years ago

As I suspected, I can't do this myself on my CONNECT machine, as I don't have the permissions needed to install the client.

I can try to persuade the people who control these things to install it for me, but I doubt I'll be able to get that done before I go away - so it'll be the week after next before I can get much further with this.