Hi,
is there a way to write an EViews program which would enable to fetch from and write to a MySql workbench database?
Fetch (write) data from (to) MySql workbench
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Fetch (write) data from (to) MySql workbench
EViews can read from and write to MySQL using their ODBC driver.
You'll have to install the MySQL ODBC driver:
http://dev.mysql.com/downloads/connector/odbc/
Then create an ODBC DSN on your machine:
http://forums.eviews.com/viewtopic.php? ... mysql#p132
Then to read in data:
http://forums.eviews.com/viewtopic.php?f=3&t=28
Or write data:
http://forums.eviews.com/viewtopic.php?f=3&t=29
Steve
You'll have to install the MySQL ODBC driver:
http://dev.mysql.com/downloads/connector/odbc/
Then create an ODBC DSN on your machine:
http://forums.eviews.com/viewtopic.php? ... mysql#p132
Then to read in data:
http://forums.eviews.com/viewtopic.php?f=3&t=28
Or write data:
http://forums.eviews.com/viewtopic.php?f=3&t=29
Steve
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Fetch (write) data from (to) MySql workbench
Another related post regarding MySQL directly:
http://forums.eviews.com/viewtopic.php? ... sql#p17568
http://forums.eviews.com/viewtopic.php? ... sql#p17568
Re: Fetch (write) data from (to) MySql workbench
How would the syntax look like between wfopen(type=odbc) and "select ..." in case I would like to connect to a server with a database requiring user id and password?
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Fetch (write) data from (to) MySql workbench
If you save the DSN as a File DSN, you can edit the DSN file (just a simple text file) to store the username and password. This way it's not so easily visible in any command you publish. Here's how to do that:
http://forums.eviews.com/viewtopic.php? ... 300&p=7745
You could also put it into the wfopen command link this:
The actual labels here (uid, pwd, database, etc.) may be different with different odbc drivers. You'll have to experiment with your ODBC driver to see what works for MySQL.
Steve
http://forums.eviews.com/viewtopic.php? ... 300&p=7745
You could also put it into the wfopen command link this:
Code: Select all
wfopen(type=odbc) dsn=MYDSN;uid=USERNAME;pwd=PASSWORD;database=MYDATABASE "select * from tablename" @freq a @id @date(datecol) @smpl @allSteve
Re: Fetch (write) data from (to) MySql workbench
Many thanks Steve!
Inittially it didn't work cause I used a 32-Bit connection config, after I reinstalled the necessary 64-Bit driver it worked perfectly!
Inittially it didn't work cause I used a 32-Bit connection config, after I reinstalled the necessary 64-Bit driver it worked perfectly!
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Fetch (write) data from (to) MySql workbench
No problem.
Yeah I should've mentioned that. 64-bit EViews will require 64-bit ODBC, while 32-bit EViews will require 32-bit ODBC. For some reason, even though the ODBC drivers are technically COM objects, you can't use them cross-bit.
Yeah I should've mentioned that. 64-bit EViews will require 64-bit ODBC, while 32-bit EViews will require 32-bit ODBC. For some reason, even though the ODBC drivers are technically COM objects, you can't use them cross-bit.
Who is online
Users browsing this forum: No registered users and 2 guests
