iwik has asked for the wisdom of the Perl Monks concerning the following question:
I have an SQL Server database to which I only have read access (and even this was a struggle!). To make this useful, Ive frontended it with an Access database, with a table linked to each of the tables in the true database. This then allows such things as queries to be created and saved, which I cannot do with the raw database. The SQL database is set up with user entered login credentials, so they first time Access attempts to touch the data, I'll get prompted for authorisation, but other than that its pretty transparent (I'm no SQL Server expert, but don't believe I have any ability of changing this without more access to the Server database).
I now need a bit more programatic access, so have been looking at doing this with Perl/DBI. Ideally I would like to bury the bulk of the database complexity in an Access query, and use DBI to access that, but the login credentials on the linked tables are causing me a bit of grief. DBI successfully connects to the Access database, prepares the query fine, but when they query is executed it immediately fails with no read access to the first of the SQL Server tables it tries to touch.
This is not surprising, because authentication credentials would normally be required at this point, but I can't figure out how to provide them. Providing them at database connect time doesn't help, because then the credentials are provided to the Access database, which doesn't need them, rather than to the database at the back end of the linked tables, which does.
Does DBI support doing this? If all else fails, I can code the complete query into the select clause and go straight to the SQL Server database, but its going to be a huge SELECT clause! Any other ideas?
Thanks and Regards
Andrew
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI, ODBC, Linked table and authentication
by Narveson (Chaplain) on Apr 01, 2008 at 15:08 UTC | |
by iwik (Initiate) on Apr 03, 2008 at 09:59 UTC | |
by iwik (Initiate) on Apr 07, 2008 at 21:17 UTC |