Pagesave(type=ODBC)

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

fi99ggb
Posts: 26
Joined: Tue Jul 02, 2019 4:05 am

Pagesave(type=ODBC)

Postby fi99ggb » Wed Mar 04, 2020 3:48 am

Hello

I am using the following code to save an EViews page on SQL database:

pagesave(type=ODBC) C:/Eviews/SARASEviews.dsn ev_depot_demand @all keep x1 x2 x3

The problem is that the table is saved with double quotes ("ev_depot_demand"). Do you know why this is the case and a way around it? I am using EViews 11.

Thanks
George

EViews Steve
EViews Developer
Posts: 614
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: Pagesave(type=ODBC)

Postby EViews Steve » Wed Mar 04, 2020 9:53 am

That’s really strange. Most databases don’t allow you to have double quotes in the table name.

What kind of database are you writing to? SQL server, Oracle, MySQL, etc?

Also, how do you know the table name has quotes around it? Can you provide a screenshot of what your seeing that shows the quotes?

Steve

fi99ggb
Posts: 26
Joined: Tue Jul 02, 2019 4:05 am

Re: Pagesave(type=ODBC)

Postby fi99ggb » Mon Mar 09, 2020 7:37 am

Hi Steve

I attach the image. When we call the table without quotes around the table name there is no table available. Is this helpful?

The database is Oracle.

Another perhaps unrelated subject is related to the variable names. Do you know why some variables have quotes around them and are in lower case? Everything is saved in lower case.

Thanks
George
Attachments
Image.PNG
Image.PNG (63.1 KiB) Viewed 2978 times

EViews Steve
EViews Developer
Posts: 614
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: Pagesave(type=ODBC)

Postby EViews Steve » Mon Mar 09, 2020 3:04 pm

I took a close look at our ODBC code and we use quotes around any names that have an underscore in the name (table names & column names).

This was due to some ODBC clients requiring this, but not Oracle. I turned this off for Oracle so this will be available in the next patch. In the meantime, you can avoid using underscores in the workfile and object names to avoid this problem.

I think the column names are appearing in different cases because we push all lowercase names, but the ones that are quoted are kept in that format while the others are reformatted to Oracle default uppercase.

We'll try to release a patch with this fix sometime next week.

Steve

fi99ggb
Posts: 26
Joined: Tue Jul 02, 2019 4:05 am

Re: Pagesave(type=ODBC)

Postby fi99ggb » Tue Mar 10, 2020 2:35 am

Hi Steve

Great, thanks for this (I thought I was going crazy..).

George


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 7 guests