Re: How to create an ODBC datasource in CI - Mailing list pgsql-odbc
From | Adrian Grucza |
---|---|
Subject | Re: How to create an ODBC datasource in CI |
Date | |
Msg-id | CADF4wWoEwaOSRj5a1Dc=BR-fN6KkHuoFLSoCfsJ9HvwjSKTR6g@mail.gmail.com Whole thread Raw |
In response to | Re: How to create an ODBC datasource in CI (Dave Cramer <davecramer@gmail.com>) |
Responses |
Re: How to create an ODBC datasource in CI
|
List | pgsql-odbc |
|
CAUTION: This Email is from an EXTERNAL source. Ensure you trust this sender before clicking on any links or attachments. On Fri, 29 Mar 2024 at 08:41, Jon Raiford <raiford@labware.com> wrote:I’m not familiar with GitHub Actions, but I know you can create data sources from the command line. This is all stored in the registry, which you can update using the reg command.
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/reg
The easiest thing to do may be to create a data source manually and export it into a .reg file. You can then either import the data source using the reg file or just use it as a template to add the entries as you like.
Just run Regedit and locate the data source you would like to export.
64-bit System Data Sources: \\HKLM\SOFTWARE\ODBC\
32-bit System Data Sources: \\HKLM\SOFTWARE\WOW6432Node\ODBC\
64-bit User Data Sources: \\HKCU\SOFTWARE\ODBC\
32-bit User Data Sources: \\HKCU\SOFTWARE\ODBC\ <- This is mixed in with the 64-bit entries and the driver referenced determines if 32/64
Drivers are defined under the system keys under the section ODBCINST.INI. Data sources are defined under the section ODBC.INI, both as a folder containing the details of the data source as well as an entry under “ODBC.INI\ODBC Data Sources”, which associates the data source with the driver to use with it.
I think if you view these entries in Regedit you will see the relationships between everything. It may help to create a data source for each type.
The above describes how to create a static ODBC data source. Alternatively you can use a file DSN or simply make a connection string from your test case and avoid the data source completely. Although I suppose you may want to do each in order to test each possibility.
Let me know if you have any questions or need assistance.
Jon
Hey Jon,Thanks, that will help immensely.It's been a while since I've done anything with Windows.Dave
From: Dave Cramer <davecramer@gmail.com>
Date: Friday, March 29, 2024 at 7:25 AM
To: PostgreSQL mailing lists <pgsql-odbc@postgresql.org>
Subject: How to create an ODBC datasource in CIGreetings,
In order to test the driver using github actions we need to be able to create a windows datasource. Usually this requires some kind of user interaction.
Has anyone done this on GH actions ?
Dave Cramer
pgsql-odbc by date: