So I've inherited this project at work that runs in Access 2003, we're upgrading to a newer version of windows (from Windows Server to Windows 7).
It uses a DSN to connect to our MySQL database, however, Access isn't seeing the database name from the DSN settings.
I already determined the ODBC error, which is as follows:
[MySQL][ODBC 5.1 Driver][mysqld-5.6.22-log]No database selected
When I run ?myDB.TableDefs("tblusers").Connect in the immediate window, I get this response:
ODBC;DSN=bnr-rolodex;DATABASE=
I've been wracking my brain for a day or two now and was wondering if anyone else had run into this.
Thanks!
Edit: I should also note that ?CurrentDb.Connect returns blank and highlighting over it has a tooltip saying "Nothing = Nothing"
AVG solved my question in the comments. The DSN was already set up, but I wound up deleting it
I rebooted after, launched the application, kicked off the Linked Table Manager with this command in the immediate window in VB:
Application.Run "acwztool.att_Entry"
I readded the DSN from there, restarted again and fired access back up and it connected sucessfully! Thanks!
Related
I have an old (created circa 1997 I believe) Microsoft Access database that has a linked table, to which only Windows XP users can connect.
When I do the following in the Immediate window
?CurrentDb.TableDefs("my linked table name").Connect
I see the following connection string:
ODBC;DSN=(some data source name);UID=(uid);PWD=(pwd);APP=2007
Microsoft Office
system;DATABASE=(someDbName);Network=(someNetworkName);
I can't figure out based on this connection string where it's trying to connect to. For example, I would expect a machine name instead of a Network name. I tried loading up the ODBC data source administrator on the machine where the connection does work, but I can't see any data source name matching the one above. I'm also not sure what the 'APP' attribute means... is that supposed to be the app from which we're connecting, or the app to which we're connecting?
I suspect that I just need to install a driver, but I have no idea which one to install.
Can anyone suggest a way I can figure out where this linked table is linked to?
I had to find the DSN referenced by the connection string, because it had the server name to connect to (as well as a pointer to a driver). I ended up exporting the DSNs from the registry of a working 32-bit machine, and editing them to go to WOW6432Node of HKLM/Software and imported them to 64-bit machines and installed appropriate driver (specified in DSN) and everything worked.
I'm trying to connect an Access 2010 database to a Pervasive dataset. My computer is Windows 7 32 bit. I've set up an ODBC connection through the ODBC administrator, but when I try to open a table in Access 2010 I get a message saying the ODBC connection has failed. What am I doing wrong?
So I've set up an ODBC connection. When I test it, the test completes successfully.
Then I go to Access and use the linked table manager to change the link to the database. The link seems to be refreshed successfully.
However, when I try to open the table, I get a message saying "ODBC-call failed" with no further information
Also, I can open the Pervasive client on my machine and view the table, it's just in Access I can't view it.
Any help would be appreciated.
Check the design of "pr_earn", possibly is different from the design of the table you were using .
The design is not automatically updated in MSAccess. An alternative is to remove and link the table again.
best regards!
I've got WampServer running a local instance of WordPress, and I have SSRS running in native mode.
I've written a report that queries the MySQL database, and it works and runs just fine within Visual Studio.
If I launch it though, it first had issues with my ODBC shared data source, which was as follows:
Name of shared data source: localhost.rds
ODBC Connection string: Dsn=localhostuserDSN
That DSN is a user DSN (as you might've guessed), and it uses the MySQL ODBC 5.3 Unicode driver. It's configured as follows:
TCP/IP server: localhost
Port: 3306
User: root
Password: <blank>
Database: wp
When tested, the connection succeeds, and the report works just fine.
When deployed though, I got the following error:
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
After much research and hair-pulling, I finally found out that if I changed the data source connection string to...
Dsn=localhostUserDSN;Driver=MySQL ODBC 5.3 Unicode Driver
...that also works, and at least then, the connection also succeed when in the Data Sources configuration screen for the report after it's deployed. But then, just when I thought I was finally out of the woods, I run the report and get the following error message:
ERROR [3D000] [MySQL][ODBC 5.3(w) Driver][mysqld-5.7.9]No database selected
The thing is, I can't specify a database, or at least I don't know a way to.
If I try changing the connection string to...
Dsn=localhostUserDSN;Driver=MySQL ODBC 5.3 Unicode Driver;database=wp
...it says the (blank) password isn't valid, before I've even pressed the 'Test' button.
If I tack on 'USE [wp]' to the query in Visual Studio, it abruptly protests.
I thought maybe I'd get around that by putting it in a stored procedure, but since the data is being queried directly from the MySQL database, I can't do that either.
(Before attempting any of this, I already tried syncing/converting the MySQL db to the SQL db, but I kept running into issues with the data conversion.)
Thinking it might be a permission issue, I've also tried running...
GRANT ALL ON [wp] TO root#localhost;
...and...
GRANT ALL PRIVILEGES ON [wp] TO root#localhost;
in SSMS, but in both cases, it says:
Cannot find the object 'wp', because it does not exist or you do not have permission.
And I'm the only admin on a local machine. I installed SQL and it uses Windows Authentication, so I don't see how I wouldn't have permission, and I have to assume it's an issue with the syntax.
I saw elsewhere here that someone suggested '[wp].*', but it doesn't like that either.
I've been at this literally all day, and I'm at my whits end, so any constructive feedback would be greatly appreciated!
For anyone stumbling across this in the future, I think we resolved the original issue, although I've run into other issues which may be specific to me.
Three things, not sure if the first one is related:
1) In the query for the dataset of the report, I specified the table like so "SELECT wp_posts.ID FROM wp_posts" instead of just "SELECT ID FROM wp_posts".
2) I went back to adding on "database=wp" to the ODBC connection string.
3) Even though both work in Visual Studio, I switched to a System DSN instead of the User DSN.
I think that should get you back in action.
I am trying to connect my classic ASP website to the MySQL database. I am using the following:
1. OS: Windows 8.1 Pro 64 bit
2. DB: MySQL 5.6.14 64 bit
3. ODBC Driver: MySQL ODBC 5.2 ANSI Driver
4. IIS: IIS 8
Here is what I have done till now.
I have downloaded the MySQL 5.6.14 64 bit database from MySQL website and installed it successfully. The database is working perfectly as I am able to create tables, stored procedures etc.
Next I created a folder (mira_dev) inside the wwwroot folder and wrote 3 classic asp pages. The first one is the login.asp page, the second one is the checklogin.asp page and the last one being the index.asp page.
Now I am able to see "It works!" in my browser.
I next created a System DSN in the ODBC Data Source Administrator (64-bit). I named it as MySQL 64 Bit, TCP/IP Server as 127.0.0.1, Port as 3306, then username as root and password as root. I tested the connection and it says "Connection successful".
The connection string that I am using is:
strconnect = ("Driver={MySQL ODBC 5.2 ANSI Driver};Server=localhost; Port:4040;Database=mira_dev;User=root;Password=root;Option=4;")
I next typed in the path to my login page on my browser and the login page came up alright.
I typed in the username and password as expected and hit Enter. The expected result is, after I hit enter it should authenticate me via the invisible page checklogin and then if it matches with the database, it should pass me to index.asp.
Now here is the catch. If I do this in Chrome/Firefox, it takes me to index.asp but instead of showing the correct contents it displays the error message: "An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error." The "click here" takes me to a page which tells me how to configure classic asp with mysql. I have done all that and I think I am on the correct path but missing something very silly.
But if I do the same steps in IE 11, then it stops me at checklogin.asp and tells me there is a server error. I am sure the logic in checklogin for authentication is fine as it works in my other computer but I am not sure what I am missing.
It would be of great help if you guys help me out. Thanks a lot in advance! :)
1) Why are you using port 4040 rather than (the default) port 3306 in your connection string? Especially when you are using 3306 in your named ODBC datasource. This looks the most likely reason for your server errors
2 )You could also try replacing "Server=localhost" with "Server=127.0.0.1". Either should work on a standard Windows box, but you know the parameters from your DSN connection work, so copy them
3 )Also try "Driver={MySQL ODBC 5.2w Driver}" - see this page http://www.connectionstrings.com/mysql-connector-odbc-5-1/
NB IE has always given you its own error messages unless you disable that feature http://msdn.microsoft.com/en-us/library/ms241741(v=vs.110).aspx
I'm trying to create a Database Connection to ODBC data sources in SPD 2007 and am having absolutely no luck. I've had some success using an SqlDataSource control, however. I don't know if SPD's database connection support is just broken or what. Googling has turned up others having issues but no definitive answers.
So, my two data sources are MySQL 5.1 ODBC and ProvideX ODBC. I pretty much have the same trouble with either, so I'll just focus on MySQL.
I've got a system DSN on the machine running SPD that is successfully connecting to the MySQL database. (This DSN also exists on the server running Sharepoint, if that matters at this time).
In SPD, I go the Data Source Library, expand Database Connection, and choose Connect to a Database. I then click on Configure Database Connection. Since neither of the providers in this dialog are appropriate, I choose "Use a custom connection string". I then set the provider to "Microsoft .Net....ODBC" and at this point I've tried the following connection strings.
First the DSN attempts:
Dsn=TheOneICreated (this one works from the SqlDataSource control)
and
Data Source=TheOneICreated
Then the more direct approach:
Driver={MySQL ODBC 5.1 Driver};Server=myServerIP;Database=dbName;User=username;Password=password;Option=3
The error I get back is always the same -
"Server Error: An error occurred while
retrieving the list of Databases from
: The server for the data source
returned a non-specific error when
trying to execute your query. Check
the format and content of your query
and try again. If the problem
persists, contact the server
administrator."
Am I fighting a losing battle here?
It looks like SD could be enumerating databases and/or tables so it has a list of tables and fields to 'help' you along....
Just a clarifying question or two..
Could this happen because SD is expecting a different way of enumerating tables? (Does it actually work with MySQL or anything ?)
What does your ODBC trace look like? (If #1 is true, you'll be able to see it and possibly create supporting views...if you truly need it to work with this particular dbms...)
Is this connection accessed from the sharepoint server? If so, do you need to define your dsn & driver there?