Hello Gord Thompson,
Yeah i found this dialect documentation and its working with the pyodbc connection. and my query works with pd.read_sql() but i want to test it with sqlalchemy cause im getting an warning that i should use sqlalchemy. But thats what i wanted to do.
cnxn = pyodbc.connect('DRIVER={Adaptive Server Anywhere 7.0};Commlinks=tcpip{ip=MyIpAdresse;Port=MyPort};ENG=MyDBName;UID=MyUserID;PWD=MyPassword')
this works fine but atm cant handle to connect my db with sqlalchemy:
engine = create_engine('DRIVER={Adaptive Server Anywhere 7.0};Commlinks=tcpip{ip=IP;Port=Port};ENG=Database;UID=ID;PWD=Password')
cnxn = engine.connect()
Error:
Traceback (most recent call last):
File "<string>", line 2, in create_engine
File "C:\Users\User\AppData\Local\Programs\Python\Python39-32\lib\site-packages\sqlalchemy\util\deprecations.py", line 309, in warned
return fn(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python39-32\lib\site-packages\sqlalchemy\engine\create.py", line 530, in create_engine
u = _url.make_url(url)
File "C:\Users\User\AppData\Local\Programs\Python\Python39-32\lib\site-packages\sqlalchemy\engine\url.py", line 731, in make_url
return _parse_rfc1738_args(name_or_url)
File "C:\Users\User\AppData\Local\Programs\Python\Python39-32\lib\site-packages\sqlalchemy\engine\url.py", line 792, in _parse_rfc1738_args
raise exc.ArgumentError(
sqlalchemy.exc.ArgumentError: Could not parse rfc1738 URL from string 'DRIVER={Adaptive Server Anywhere 7.0};Commlinks=tcpip{ip=IP;Port=Port};ENG=Database;UID=ID;PWD=Password'
Thanks in advance