Jul 22 2004, 03:18 PM
I have an Access program written before I arrived that does not work. It was moved at one time but still functions, though it is old data. I get a message ODBC--connection to Visual FoxPro failed. Do I have to go to User DSN to fix this or is there a menu in Access where I can look at the ODBC setup.
I am having no luck with the User DSN, that is why I am asking.
Jul 22 2004, 03:29 PM
well you need to go into access and find out the details of the ODBC connection (i.e. type, where to, what's it doing etc,)
Jul 22 2004, 03:30 PM
You need to use ODBC manager to change DSN settings.
However, it is possible to have VBA code in Access that tries to connect through ODBC to some VisualFox tables - in that case you'll need to find that piece of code and adjust it accordingly.
Jul 22 2004, 03:42 PM
When entering Visual Basic, there are only Two forms, and neither of them mention Visual FoxPro in their code. Could it be elsewhere?
Jul 22 2004, 04:33 PM
Use Edit> Find , Entire Database, "ODBC".
Also, in Tables TAB, if you have linked tables through ODBC , try to open them.
(in MSysObjects table you can see DSN information used to create those links)
Jul 22 2004, 08:04 PM
Try checking this one out ... DSN Less
Jul 23 2004, 04:04 AM
There is a technique called DSN-Less connection, using the code that Jay has posted it is possible to connect to an OBDC database without having a DSN configured. As all the connection details driver etc are included within the code. I have used this technique to connect to a MySQL database.
If there are linked tables in the database then goto tools->options-> view, and make sure there is a tick in box called 'system objects'. Then if open the table 'MSysObjects' under connect field the connection string is shown there.
Jul 23 2004, 04:08 AM
The advantages of using a DNS-less connection is that it becomes much easier to distribute the database application because you don't have to create the DSN and it should be slightly faster since the code doesn't have to access the registry or disk to get the DSN info.
Not sure what the drawback is; probably the lack of info on how to do it or what its advantages are.
Jul 23 2004, 01:20 PM
I just wanted to say THANKS! You were all a great help. While I am still working on links, all the tables and ODBC issues are now fine!
Jul 23 2004, 02:47 PM
You' very welcome , we're glad you sorted out! o!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here