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

Option type out of range #312

Open
SSASI74 opened this issue Jun 17, 2021 · 3 comments
Open

Option type out of range #312

SSASI74 opened this issue Jun 17, 2021 · 3 comments

Comments

@SSASI74
Copy link

SSASI74 commented Jun 17, 2021

hi there,

slowly getting this to work

but now the query fails with :

2021-06-17
Traceback (most recent call last):
File "C:\Users\Something.conda\envs\Conda36\lib\site-packages\turbodbc\exceptions.py", line 41, in wrapper
return f(*args, **kwds)
File "C:\Users\Something.conda\envs\Conda36\lib\site-packages\turbodbc\cursor.py", line 131, in execute
self.impl.prepare(sql)
turbodbc_intern.Error: ODBC error
state: HY092
native error code: 0
message: [Microsoft][ODBC Driver Manager] Option type out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Something.conda\envs\Conda36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\Something.conda\envs\Conda36\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "c:\program files (x86)\microsoft visual studio\2019\enterprise\common7\ide\extensions\microsoft\python\core\debugpy_main
.py", line 45, in
cli.main()
File "c:\program files (x86)\microsoft visual studio\2019\enterprise\common7\ide\extensions\microsoft\python\core\debugpy/..\debugpy\server\cli.py", line 430, in main
run()
File "c:\program files (x86)\microsoft visual studio\2019\enterprise\common7\ide\extensions\microsoft\python\core\debugpy/..\debugpy\server\cli.py", line 267, in run_file
runpy.run_path(options.target, run_name=compat.force_str("main"))
File "C:\Users\Something.conda\envs\Conda36\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\Something.conda\envs\Conda36\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\Something.conda\envs\Conda36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Something\source\repos\Somethingelse\module2.py", line 21, in
cursor.execute('SELECT StockbookNumber FROM VS_01_NewVehicleStock')
File "C:\Users\Something.conda\envs\Conda36\lib\site-packages\turbodbc\exceptions.py", line 43, in wrapper
raise DatabaseError(str(e))
turbodbc.exceptions.DatabaseError: ODBC error
state: HY092
native error code: 0
message: [Microsoft][ODBC Driver Manager] Option type out of range
Press any key to continue . . .

any ideas?

so close

@xhochy
Copy link
Collaborator

xhochy commented Jun 17, 2021

This error also pops up in rodbc and was fixed with r-dbi/odbc@e7619aa

@SSASI74 Do you connect to an MS Access database by any chance?

@SSASI74
Copy link
Author

SSASI74 commented Jun 17, 2021

no it is a Kerridge (CDK) db, this works with pyodbc but I was hoping this would be quicker.

Thanks again for your help

@SSASI74
Copy link
Author

SSASI74 commented Jun 18, 2021

is there a way to fix this or should i go back to pyodbc?

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

2 participants