Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rqTXh-00CbJS-FR for pgsql-odbc@arkaria.postgresql.org; Sat, 30 Mar 2024 07:54:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rqTWg-007Ole-MA for pgsql-odbc@arkaria.postgresql.org; Sat, 30 Mar 2024 07:53:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rqTWg-007OlV-A3 for pgsql-odbc@lists.postgresql.org; Sat, 30 Mar 2024 07:53:18 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rqTWc-007Wi3-JK for pgsql-odbc@postgresql.org; Sat, 30 Mar 2024 07:53:17 +0000 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a4644bde1d4so330683566b.3 for ; Sat, 30 Mar 2024 00:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711785193; x=1712389993; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/S2T2oRYl4PY2q6g4GnTX1sNWFsLOyYLYJZjJvh9VOY=; b=FfvZ/7//6+CPd/Q8SLTRV0O4mYsmITn/uif2xaFhqE2IJp8eq/A/N8tAGWq928YxhD mTjrozb0eObaqcqpaNlpf//KDfsVXDtDnyLw6TpYv2UsivAlpjK5zUZWjgn6wfcFJLzW TSxkM2fmsl37fW1rPOLW3GCQ04Z+EgiIzNiw4wreTd6mvGuC7T257bYe2OFwpTbldqbE wVH6vEbHZhtH7nKYatwEeqD/rasFoTX5lq38QmLKTG20JC4aYjNX3q5Zt90AEsIWXMfO RUyBAa6GwLfquqZ6+A7G1p/P8YOtukHjnj+Ph5GvMpLhYxWpOY21oIu/Uz+kPtsV4oG4 f1aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711785193; x=1712389993; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/S2T2oRYl4PY2q6g4GnTX1sNWFsLOyYLYJZjJvh9VOY=; b=DRYI5x96ldIHm1MRh9cJVSoZbzdxSEmtOSzTLEP/wuU1khpcTR7x6DuN5h5ZDxf9ME eZqqq76Ms2GDIU1slSPTSPG/Y4nl70uvQwk3DIR184GI3V/u1Aj/69+DUIcvJYwwzj2E /iVYqcsleN1hQOlfpgvgc6bU1togsKpk8Z+YS0xkbLQwiipqywtUnd2qU4h+YuRZxXRx JUIde6V5uB103DAqjKlEHPx9ERi2X2s7fIeBxYDUlJKR8I79ztG7KF5s31xgUi+SMW8m JKhrK6YM+7hswC8MuIpzMN7rnmHSigIEJzrse/GRP7zjfBcb12yTXBGrC4KSWNUafs/m mogQ== X-Forwarded-Encrypted: i=1; AJvYcCWgKL4CI+Xf7wgSPk3FdKuCRdr3mHpfbAlWtNGKxcAm7siYdjRKm6XI7z84dRcq0yTeCKyTiBxThKm6Lu7o3FA01h0AbgiyZ0fv X-Gm-Message-State: AOJu0YwpNxhqR/hmt57pmP4coykbxiLz516X4t4pFzJlbUIS1zDQbeXp j9ZHZn2GF/m88bhZmdyUd4tALDnOBWBkHpYgYqnmqsr7q8UcnrukqqaM0TetQN5V++wA/4DFckP hYEnLJqtsDBOgeH5q52aB6lobQgw= X-Google-Smtp-Source: AGHT+IExsSOijkdjALv68m4JZTI6prp3FK20J9MIqCUTGtn4nhymo1v1tyUa0jeDVDdr+zYUzhQXrWoPUrV/4Rp9K88= X-Received: by 2002:a17:906:2654:b0:a4e:23b5:3874 with SMTP id i20-20020a170906265400b00a4e23b53874mr2452149ejc.12.1711785192785; Sat, 30 Mar 2024 00:53:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dave Cramer Date: Sat, 30 Mar 2024 03:52:54 -0400 Message-ID: Subject: Re: How to create an ODBC datasource in CI To: Adrian Grucza Cc: Jon Raiford , PostgreSQL mailing lists Content-Type: multipart/alternative; boundary="000000000000590fc90614dc0ca5" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000590fc90614dc0ca5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 29 Mar 2024 at 18:49, Adrian Grucza wrote= : > winbuild/regress.ps1 uses RegisterRegdsn.exe (built from > test/RegisterRegdsn.c) to install the driver and register a data source. > You could use that, or you may find it easier to use the Wdac cmdlets > in > PowerShell, specifically Add-OdbcDsn and Set-OdbcDsn. > > Yes, I saw those, was going to try them. I think the challenge is registering the driver first though. Dave > > [image: iress.com] > Adrian Grucza > Technical Lead > Office: +61390185800 > adrian.grucza@iress.com > www.iress.com > Level 16 385 Bourke St Melbourne, Victoria, 3000 > The contents of this email originated from Iress. For this purpose Iress > includes Iress Limited and/or any of its subsidiaries, holding companies > and trading entities. If you have received this email in error please > notify the sender immediately and delete this email. > nosig > On Sat, 30 Mar 2024 at 2:12=E2=80=AFam, Dave Cramer wrote: > >> >> >> *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 wrote: >> >>> I=E2=80=99m not familiar with GitHub Actions, but I know you can create= data >>> sources from the command line. This is all stored in the registry, whic= h >>> 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 y= ou >>> 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 =E2=80=9CODBC.INI\ODBC Data Sources=E2=80=9D, which associates th= e 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 f= or >>> 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 >>> *Date: *Friday, March 29, 2024 at 7:25=E2=80=AFAM >>> *To: *PostgreSQL mailing lists >>> *Subject: *How to create an ODBC datasource in CI >>> >>> Greetings, >>> >>> >>> >>> 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 >>> >> --000000000000590fc90614dc0ca5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, 29 Mar 2024 at 18:49, Adrian = Grucza <adrian.grucza@iress.c= om> wrote:
winbuild/regress.ps1 uses RegisterRegdsn.exe (buil= t from test/RegisterRegdsn.c) to install the driver and register a data sou= rce. You could use that, or you may find it easier to use the Wdac cmdlets=C2=A0in PowerShell, specifical= ly Add-OdbcDsn and Set-OdbcDsn.


Yes, I saw those, was going to try them. I thi= nk the challenge is registering the driver first though.

Dave=C2=A0

3D"iress.com"
<= /tr>
Adrian=C2=A0Grucza<= /span>=C2=A0=C2=A0
Technical=C2= =A0Lead
=
Office:=C2=A0+61390185800
=
adr= ian.grucza@iress.com
www.iress.com
<= /tbody>
Level=C2=A016=C2=A0385=C2=A0Bourke=C2= =A0St
=C2=A0Melbourne,=C2=A0Victoria,=C2=A03000
=
The conte= nts of this email originated from Iress. For this purpose Iress includes Ir= ess Limited and/or any of its subsidiaries, holding companies and trading e= ntities. If you have received this email in error please notify the sender = immediately and delete this email.=C2=A0
nosig
On Sat,= 30 Mar 2024 at 2:12=E2=80=AFam, Dave Cramer <davecramer@gmail.com> wrote:

<= td>

CAUTION: This Email is from an EXTERNAL source. Ensu= re you trust this sender before clicking on any links or attachments.




On Fri, 29 Mar 2024 at 08:41, J= on Raiford <rai= ford@labware.com> wrote:

I=E2=80=99m not famil= iar with GitHub Actions, but I know you can create data sources from the co= mmand line. This is all stored in the registry, which you can update using = the reg command.

=C2=A0<= /span>

https:= //learn.microsoft.com/en-us/windows-server/administration/windows-commands/= reg

=C2=A0<= /span>

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 i= t as a template to add the entries as you like.


Just run Regedit and locate the data source you would like to export.

=C2=A0<= /span>

64-bit System Data So= urces: \\HKLM\SOFTWARE\ODBC\

32-bit System Data So= urces: \\HKLM\SOFTWARE\WOW6432Node\ODBC\

64-bit User Data Sour= ces: \\HKCU\SOFTWARE\ODBC\

32-bit User Data Sour= ces: \\HKCU\SOFTWARE\ODBC\=C2=A0=C2=A0=C2=A0=C2=A0 <- This is mixed in wi= th the 64-bit entries and the driver referenced determines if 32/64<= u>

=C2=A0<= /span>

Drivers are defined u= nder the system keys under the section ODBCINST.INI. Data sources are defin= ed under the section ODBC.INI, both as a folder containing the details of t= he data source as well as an entry under =E2=80=9CODBC.INI\ODBC Data Sources=E2=80=9D, which associates the d= ata source with the driver to use with it.

=C2=A0<= /span>

I think if you view t= hese entries in Regedit you will see the relationships between everything. = It may help to create a data source for each type.

=C2=A0<= /span>

The above describes h= ow to create a static ODBC data source. Alternatively you can use a file DS= N 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.

=C2=A0<= /span>

Let me know if you ha= ve any questions or need assistance.

=C2=A0<= /span>

Jon

<= /div>

Hey Jon,

Thanks, that will help immensely.

It's been= a while since I've done anything with Windows.

Dave=C2=A0
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
<= div>

=C2=A0<= /span>

=C2=A0<= /span>

From: Dave Cramer <davecramer@gmail.com>
Date: Friday, March 29, 2024 at 7:25
=E2=80=AFAM
To: PostgreSQL mailing lists <pgsql-odbc@postgresql.org>
Subject: How to create an ODBC datasource in CI
=

Greetings,

=C2=A0

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.

=C2=A0

Has anyone=C2=A0done this on GH actions ?<= /u>

=C2=A0


Dave Cramer

--000000000000590fc90614dc0ca5--