Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some issues #5

Open
wuyongfei opened this issue Jun 16, 2013 · 3 comments
Open

some issues #5

wuyongfei opened this issue Jun 16, 2013 · 3 comments

Comments

@wuyongfei
Copy link

I am working on a project with your node-odp. there are some issues I have met so far.

1, scalar and reader

sql1 = select count() from a_table where xxx
sql2 = select count(
) as amount from a_table where xxx
when use scalar to run sql1, get nothing. if use reader to run sql2, you always get amount

2, catch error

my app loads records from oracle into mongodb. reader is used. problem is when error occurs (for instance, ora - xxxxxx, say SELECT TO_DATE("Column", 'mm/dd/yyyy') as ADATE FROM a_table but actually '2013-01-01' in the "Column", this causes a conversion error), this error can not be caught. In this case, what my app wants is just ignores the error and works on next row. BUT there is no way from crashing the app.

3, charset

Any other tools I use to get data from Oracle correctly deal with UTF8 chars such as Chinese characters, but node-odp does not. Is there a way to deal with charset?

I may do something wrong??? Need help! Thanks!

Gavin

@bomsy
Copy link
Owner

bomsy commented Jun 19, 2013

  1. scalar : nothing is returned because of an error that occurs when your result is converted to a json object. This is due to the asterisk (*) in the column name (which is not valid as a json object). working on fixing that.

reader: the reader returns rows or rowsets so to get your count value use

rows[0]["COUNT(*)"]
  1. i'm working on getting errors to be thrown through the error, update soon.

  2. I'm not consiously dealing with charsets at the moment, but i'm looking into it based on your issue. Update soon.

Thanks

@wuyongfei
Copy link
Author

Thanks a lot Bomsy!

@fmatosinhos
Copy link

Hi guys,

Did you solve the problem: "2, catch error"?
Could you give me the solution?

Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants