dbCOPY backward compatibility issue

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

jthodge
Posts: 77
Joined: Tue Oct 21, 2008 5:52 am

dbCOPY backward compatibility issue

Postby jthodge » Mon Mar 22, 2010 6:56 am

We are in the process of transitioning to Eviews 7 and have run across a backward compatibility issue with Eviews databases.

In our Eviews code, we first create a database on our local hard drive (dbcreate c:\...) and then copy this database up to our server (dbcopy) to be used by some people working with Eviews 7 and some people still working with Eviews 6. (We've found that this method works quicker than storing directly to the database on the server).

From an earlier post in this forum, I discovered that there is the new option on the dbcreate command for "type=eviews6" to set up a database that can be read by Eviews 6. This option works great for the database created on our C: drives -- they can be opened/queried by Eviews 6.

However, for some reason, this compatibility is lost as soon as the database is copied to our server. I just noticed that the database is Version 2.0 on the C: drive but becomes version 4.0 when it is copied to the server, and is thus not readable by Eviews 6.

Is this a bug or is there some dbcopy option that I'm missing?

EViews Chris
EViews Developer
Posts: 161
Joined: Wed Sep 17, 2008 10:39 am

Re: dbCOPY backward compatibility issue

Postby EViews Chris » Mon Mar 22, 2010 10:26 am

Not sure if it's a bug, but it's certainly a missing feature.

Before looking into things closely, I thought that the answer was to use:

dbcopy(type=eviews6) mydb mydb2

but the 'type=' option actually refers to the type of the source database not the destination database.

There is a way to set the destination database type when doing the same operation interactively in the dialog that comes up from the 'Copy the Database...' menu item, but there currently doesn't seem to be any command option that matches up with this.

I'll look into adding a 'desttype=' option to fix this. i.e.

dbcopy(desttype=eviews6) myv6 myv6copy

Note that in cases where the type has a unique file extension, you can specify an extension on the destination to determine file type, but this isn't going to work with v6/v7 databases.

jthodge
Posts: 77
Joined: Tue Oct 21, 2008 5:52 am

Re: dbCOPY backward compatibility issue

Postby jthodge » Wed Mar 24, 2010 1:25 pm

I see that your Mar 23 2010 patch for Eviews 7 now includes the (desttype=Eviews6) option for the dbcopy command.

After experimenting with the new option a bit, I see that the default property is to copy the database in the same format it currently is in (i.e. Version 2.0 -> Version 2.0 or Version 4.0 -> Version 4.0). In that case, I don't even need to worry about setting the dbcopy option as long as I set up my database using dbcreate(type=eviews6).

Anyway, I appreciate your prompt response to updating the software.

EViews Chris
EViews Developer
Posts: 161
Joined: Wed Sep 17, 2008 10:39 am

Re: dbCOPY backward compatibility issue

Postby EViews Chris » Wed Mar 24, 2010 4:19 pm

Unfortunately, my response was a bit too prompt this time!

The behaviour really is meant to be that if the 'desttype=' option is not provided (and there is no file extension given for the destination), the destination database is always an EViews 7 database. This gives a behaviour that is consistent with what happens when you dbcopy any other foreign format database.

What you are seeing where EViews is preserving the version 6 database format during a dbcopy is actually caused by a bug (where EViews is ignoring the option to force a version 6 database to be copied into version 7 format).

I looked into whether we could keep the behaviour that you found but for various reasons it didn't look like a good idea.

We'll post a patch to fix the bug, but I'm afraid you will require 'desttype=eviews6' to keep a version6 database in version6 format during a dbcopy.

Sorry for any confusion.

jthodge
Posts: 77
Joined: Tue Oct 21, 2008 5:52 am

Re: dbCOPY backward compatibility issue

Postby jthodge » Thu Mar 25, 2010 6:45 am

Thanks for the warning Chris.

We'll make sure our dbcopy command specifically includes the option "desttype=eviews6" so that next time we update our software, we won't be caught by the bug correction.

With or without the bug, the new option does help us in our transition from Eviews 6 to 7.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests