Problems importing MySQL data into Access 2010 - mysql

I have a small database with 10 tables in it - of those, 6 import directly into Access via an ODBC connection to a MySQL database without any issue. However, 4 of them throw an error: "Could not open the object"
The MySQL ODBC driver is 3.51 -- anything greater didn't work at all and it was suggested on the MySQL.com support site to use 3.51 instead.
I can also import these into Excel without any trouble... so I am not sure if the issue is with Access or the ODBC driver..

I've seen this issue happen with MySQL tables containing field types that Access/Jet doesn't understand and that the MySQL ODBC driver doesn't fully translate enough for Access to map to a known field type (to Access). I know it's been a bit of time - but do you think you could post a description of your table(s) that are having trouble? Perhaps you could get more MySQL/Access people in here answering your issue (if I can't, that is).

Related

ERROR [3D000] [MySQL][ODBC 5.3(w) Driver][mysqld-5.7.9]No database selected

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.

Connecting to remote mySQL via Excel VBA

Likely a dumb question but brain isn't piecing this together---
tl;dr: My main question is how do I choose the right parameters for my connection string? How do I determine what my driver should be? Provider? Option? Where do I find a list of acceptable parameters? How do I choose between ADO and OLE?
Objective: to connect to a hosted mySQL db of which I am admin.
Problem: creating a successful connection string / choosing the right parameters.
I'm new to referencing remote databases. Been looking all day today and yesterday; there are tons of articles and posts out there but nothing is working for me--I'm just trying to replicate what I see being done when I need to just design the string properly, but I don't know where to start.
I've tried using ActiveX Data Objects 2.7, 2.8 and 6.1 libraries. Also tried using OLE DB Simple Provider 1.5 Library. Below tests are using ADO 6.1.
Tried these connection strings:
DRIVER={MySQL ODBC 5.3 Unicode Driver};SERVER=ipaddress;PROVIDER=SQLOLEDB;DATABASE=xxx;UID=xxx;PWD=xxx;
---Error: waits ~30 seconds, times out and says Invalid Connection String Attribute
DRIVER={MySQL ODBC 5.3 Unicode Driver};SERVER=ipaddress;PROVIDER=Microsoft.Jet.OLEDB.4.0;DATABASE=db_name;USER=xxx;PASSWORD=xxx;
---Error: immediately errors and says cannot find installable ISAM
SERVER=ipaddress;PROVIDER=SQLOLEDB;DATABASE=xxx;UID=xxx;PWD=xxx;
---Error: waits ~30 seconds, times out and says SQL Database does not exist or access denied
I'm sure i've added the correct user with password and permissions. I haven't done anything with DSN.
I'm on win8.1 x64 using Excel 2013. Any advice is much appreciated!!

Trying to migrate SQL Server to MySQL using MySQL Workbench. Error: "[Microsoft][ODBC Driver Manager] Invalid argument value" when migrating data

Long time lurker, first time poster; hoping anyone can help me out.
Im using MySQL Workbench 5.2.41 to migrate a database from SQL Server to MySQL 5.0.8
The entire process goes smoothly: both SQL and MySQL connection Tests are good, the skemea and table create as expected, everything checks out until the 'Bulk Data Transfer' step. At that point I receive this error:
...
Migrating data...
wbcopytables.exe --odbc-source=DSN=SQL Server 11;DATABASE=;UID=sa --target=root#127.0.0.1:3306 --progress --passwords-from-stdin --thread-count=1 --table [GSAClosers_v2] [dbo].[AccountBase] `dbo` `AccountBase`
`dbo`.`AccountBase`:Copying 84 columns of 169530 rows from table [GSAClosers_v2].[dbo].[AccountBase]
ERROR: `dbo`.`AccountBase`:SQLGetData: HY009:10:[Microsoft][ODBC Driver Manager] Invalid argument value `dbo`.`AccountBase`:
Finished copying 0 rows in 0m00s
Copy helper has finished
...
For connectors I'm using Microsoft SQL Server / ODBC Data Source / DSN: SQL Server and for MySQL the IP and port(3306).
SQL Server 2012 Management Studio connects and all operations work as expected.
O, side not: both are on the same localhost machine.
If anyone can shed some light on this I would be forever indebted. Thanks in advance
From here:
[Microsoft][ODBC Driver Manager] Invalid argument value.
Regarding to the error message and code you provided, which seems is
database is invalid or cannot be accessed. That means either the
database does not exist or the user does not have permission to access
the database.
It turns out you need specify the instance after the server name, so
in the server name in the dialog box for creating the ODBC Data
Source, you must enter it as either: MyServer\SQLEXPRESS or
.\SQLEXPRESS
I think you may have a problem connecting to your database from wbcopytables.exe. Keep in mind that this is a separate tool so the fact that you can connect from the rest of the Migration Wizard doesn't imply that you will connect in wbcopytables.exe.
The thing that worries me the most is that your DSN has whitespace characters. This might be interpreted by the Windows terminal as independent command line parameters. One thing you can do is to edit your DSN name removing the whitespaces and try again.
You may also want to connect without a DSN by putting all your connection parameters explicitely as explained in my blog post: How-To: Guide to Database Migration from Microsoft SQL Server using MySQL Workbench.
And, by the way, since MySQL Workbench 5.2.42 is out you should go and get it. The Migration Wizard is pretty new so important bug fixes are likely launched in each recent Workbench release.
In either case I think you should file a bug with your issues with a detailed explanation about how to reproduce it, possible solutions, etc.
Hope this helps.
Ok, got it figured out: un-install java. install java 1.6, use MySQL Migration Tool. change all data types to varchar, ints and bits. run migrations....eat data.

SSIS data Import from MySql

I am working with SSIS and trying to import data from MySql to SQL Server. I am having issues trying to convert mySql datetimes to SQL Server Datetimes. Any suggestions?
Can you provide an example of the error or problem? I found some values in MySQL were out of range to SQL Server. In these instances, I used a NULLIF on the MySQL side to remove the bad values first. Rafal Ziolkowski's solution of converting to strings could work as well, but I personally would prefer to push the conversion off to the MySQL query if it is only impacting data columns.
Try convert date to string and then to datetime again.
What is the issue? Which SSIS data type are you using? DT-DBTIMESTAMP should work for both.
this took me few days to figure out...so I thought I would share my notes
How to connect and load data from MySQL to SQL Server
Download the 32 bit ODBC driver.
go to the MySQL website and download: “mysql-connector-odbc-5.2.4-ansi-win32.msi”
NOTE: Do not use the 64 bit driver on BIDS 2008. BIDS 2008 is 32 bit. You will get a mismatch error when creating SSIS’s connection manager: “The specified DSN contains an architecture mismatch between the Driver and Application”
Create a User DSN
You need to open the using windows 32 ODBC admin tool. DO NOT open the regular ODBC admin, in control panel. Open the ODBC admin located here: c:\Windows\SysWOW64\odbcad32.exe. If you use the default ODBC admin…it will not work. Additionally you must create a “User DSN” - NOT a System DSN. Otherwise it will not show up in SSIS
NOTE: the screens look the same so you will have no way of knowing whether you are in 32 BIT ODBC Admin tool or not.
Create a new SSIS package and create an ADO.NET connection manager:
Change the Source ADO.NET properties.
You will get validation errors and your package will not run. You need to change the “ValidateExternalMetadata” to FALSE (in the “Advanced Editor” dialog box) of the ADO.NET source It will also give you metadata error…that’s ok…just click ok. It will still pull the metadata (column names/data types). You cannot select the tables as you would in SQL server. You need to type the SQL select statement.
Run the package and should run and load normally.

Sharepoint Designer 2007 ODBC database connection to MySQL impossible?

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?