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 1rqL5H-00Bpou-Em for pgsql-odbc@arkaria.postgresql.org; Fri, 29 Mar 2024 22:52:28 +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 1rqL5G-005A2J-L1 for pgsql-odbc@arkaria.postgresql.org; Fri, 29 Mar 2024 22:52:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rqL2I-0057s2-Kf for pgsql-odbc@lists.postgresql.org; Fri, 29 Mar 2024 22:49:22 +0000 Received: from mx08-00574e01.pphosted.com ([185.183.31.38]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rqL2A-0077Yw-U1 for pgsql-odbc@postgresql.org; Fri, 29 Mar 2024 22:49:20 +0000 Received: from pps.filterd (m0213998.ppops.net [127.0.0.1]) by mx08-00574e01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 42TMN9hs021113 for ; Fri, 29 Mar 2024 22:49:13 GMT Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by mx08-00574e01.pphosted.com (PPS) with ESMTPS id 3x5390ss1p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 29 Mar 2024 22:49:12 +0000 (GMT) Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-513e45ab9a8so1817735e87.2 for ; Fri, 29 Mar 2024 15:49:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711752551; x=1712357351; 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=TAoLrFhcmRKE6/iZBtOQBoZE2Cr6LcE889lV+SMMFho=; b=PKlGWWtkv97xfV/2GZNOnDYrpd7tqH3lNoIKHlJy3D0e2jgTsSmovYi1IZfFV7JoH4 hCr5LM9bkuu0J23sIi1IDs3Ie4g4nH9bipwuha1rOAlQtLihVcuZajI4L+xlQnioYWWg 1u5dfsm4dVu/MSN5feLHPasWeKGhxFY6PfvbrM+CDdN8mGN7y23jArFERCGFhQdUhjBM h7Sf/FSZJ1cmiH1KcKfkY87CNek+mMM76hWS2RzhdCS1YRxdcUmKpC0iG4yZ3tB2pcHH RBlysSbepdrnup1cyhg8YUHsfar3G/Qf7a2LxXEYgKKPiPRqYzfw1eDh2SRT92ZWiZw1 YaKA== X-Forwarded-Encrypted: i=1; AJvYcCUfcuFyceS/lb8SC/wpH6lS7m3pjHEw5xJa7Qlyz+jlezhQNzDeA5bFXIfklgtdcNoVVyQ7tCdVYEm7jXwNlEW1pBn5dYUt09JJ X-Gm-Message-State: AOJu0YwBDJSH05IEi+7IynUS/Dd9z7VWSydabetdH7iAsgA9uwea8NSP uA3Fk4bGmXlkYBYE/pkoSRNl+Wl7D8oM9rBLs4pzT1LkQALwfgK/gEr4YzngMwUL3RAK+EhmuZa kxIjl+1DaSZQX7COqqgkRygF/xUytYA10Hr2sCZ+ORTgILwAt5wAgFodt5MF0hTOQG7FYFbyFbm kI7QPdpoPYKGfNr5Y73nQ7LM3+7KyAxvDBK6gh X-Received: by 2002:a19:f809:0:b0:515:d3fe:72c2 with SMTP id a9-20020a19f809000000b00515d3fe72c2mr1179034lff.39.1711752550315; Fri, 29 Mar 2024 15:49:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG5SdgfaPH+0bmxF6nsg2TLsaP7mK7badhkf6MmKwie+vKcS684jjPoHKYEjGnV3UoDR80IAJVJuLfE X-Received: by 2002:a19:f809:0:b0:515:d3fe:72c2 with SMTP id a9-20020a19f809000000b00515d3fe72c2mr1179012lff.39.1711752549519; Fri, 29 Mar 2024 15:49:09 -0700 (PDT) Received: from eu2.smtp.exclaimer.net (eu2.smtp.exclaimer.net. [52.169.0.179]) by smtp-relay.gmail.com with ESMTPS id hv12-20020a17090760cc00b00a469fecc865sm132096ejc.10.2024.03.29.15.49.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Mar 2024 15:49:09 -0700 (PDT) X-Relaying-Domain: iress.com Received: from mail-ed1-f69.google.com (209.85.208.69) by eu2.smtp.exclaimer.net (52.169.0.179) with Exclaimer Signature Manager ESMTP Proxy eu2.smtp.exclaimer.net (tlsversion=TLS12, tlscipher=TLS_ECDHE_WITH_AES256_SHA1); Fri, 29 Mar 2024 22:49:09 +0000 X-ExclaimerHostedSignatures-MessageProcessed: true X-ExclaimerProxyLatency: 7067538 X-ExclaimerImprintLatency: 2656748 X-ExclaimerImprintAction: 5dbfb0f10b9743298f45ca1118738890 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-56bf2d59fceso1986010a12.3 for ; Fri, 29 Mar 2024 15:49:08 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXxOqyLdjiA4YrsdiTEw6hAl9gIUpPBoD1VJzZf3pddTe2vbefXGMJarIaG9igwWeSHSm2+fq7zMSAgmXULjBLoJYsjS8SuQLkX X-Received: by 2002:a17:906:eec3:b0:a4e:1036:7da5 with SMTP id wu3-20020a170906eec300b00a4e10367da5mr2402507ejb.70.1711752548182; Fri, 29 Mar 2024 15:49:08 -0700 (PDT) X-Received: by 2002:a17:906:eec3:b0:a4e:1036:7da5 with SMTP id wu3-20020a170906eec300b00a4e10367da5mr2402497ejb.70.1711752547752; Fri, 29 Mar 2024 15:49:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Adrian Grucza Date: Sat, 30 Mar 2024 09:48:55 +1100 Message-ID: Subject: Re: How to create an ODBC datasource in CI To: Dave Cramer Cc: Jon Raiford , PostgreSQL mailing lists Content-Type: multipart/alternative; boundary="0000000000008d722f0614d472ca" X-Proofpoint-ORIG-GUID: 4Crbo-M8Gq9gElEluSDIFreb8_bpII3s X-Proofpoint-GUID: 4Crbo-M8Gq9gElEluSDIFreb8_bpII3s List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --0000000000008d722f0614d472ca Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. 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 in= cludes Iress Limited and/or any of its subsidiaries, holding companies and = trading entities. =E2=80=8BIf 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, 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 yo= u >> 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= =2E >> 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 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 fo= r >> 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 >> > --0000000000008d722f0614d472ca Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
winbuild/regress.ps1 uses Regist= erRegdsn.exe (built from test/RegisterRegdsn.c) to install the driver and r= egister a data source. 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.


<= div class=3D"gmail_quote">
<= tr style=3D"font-size:0;">
=
3D"=
<= /table>On Sat, 30 Mar 2024 at 2:12=E2=80=AFam, Dave Cramer <davecramer@gmail.com> wrote:

=
Adrian Grucza<= span style=3D"font-family:'zone-1';">​  
<= /tr><= /tr>
Technical Lead
Office: +61390185800
adrian.grucza@iress.com
www.iress.co= m
<= tr style=3D"font-size:0;">
=
Level 16 385 Bourke St
 Melbourne, Victoria, 3000
The contents of this email o= riginated 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. 
n= osig
<= 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-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rg= b(204,204,204)">

=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

--0000000000008d722f0614d472ca--