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

Add support for FileDSNs #452

Open
AetherBreaker opened this issue Oct 26, 2023 · 1 comment
Open

Add support for FileDSNs #452

AetherBreaker opened this issue Oct 26, 2023 · 1 comment

Comments

@AetherBreaker
Copy link

No description provided.

@gordthompson
Copy link

A File DSN works fine for me.

import asyncio

import aioodbc


async def async_main():
    cnxn = await aioodbc.connect(
        dsn="FILEDSN=/__tmp/my_file_dsn.dsn;UID=scott;PWD=tiger^5HHH",
    )
    crsr = await cnxn.cursor()
    await crsr.execute("SELECT 1 AS foo")
    foo = await crsr.fetchval()
    print(foo)  # 1
    await crsr.close()
    await cnxn.close()


asyncio.run(async_main())

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