Created
September 9, 2024 22:46
-
-
Save meskallito/dae32667c701c1da42e0cc65797d070a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as odbc from 'odbc'; | |
| async function connectToDenodo() { | |
| const connectionString = `Driver={DenodoODBC}; | |
| Server=your_denodo_server_address; | |
| Port=9999; | |
| UID=your_username; | |
| PWD=your_password;`; | |
| let connection; | |
| try { | |
| connection = await odbc.connect(connectionString); | |
| console.log('Connection successful!'); | |
| // Example query | |
| const result = await connection.query('SELECT * FROM your_table_name'); | |
| console.log(result); | |
| } catch (error) { | |
| console.error('Error connecting to Denodo:', error); | |
| } finally { | |
| if (connection) { | |
| await connection.close(); | |
| } | |
| } | |
| } | |
| connectToDenodo().catch((error) => { | |
| console.error('Error in connection process:', error); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment