Rerun the application:
dotnet run
The run may fail with the error “System.Data.ODBC is not supported on this platform.” The output may look like:
Unhandled Exception:
System.PlatformNotSupportedException: System.Data.ODBC is not supported on this platform.
at System.Data.Odbc.OdbcConnection..ctor(String connectionString)
at ConsoleApplication1.Program.Main(String[] args) in /root/odbc_sample/Program.cs:line 18
[ERROR] FATAL UNHANDLED EXCEPTION: System.PlatformNotSupportedException: System.Data.ODBC is not supported on this platform.
at System.Data.Odbc.OdbcConnection..ctor(String connectionString)
at ConsoleApplication1.Program.Main(String[] args) in /root/odbc_sample/Program.cs:line 18
This is a known problem, see issue . The fix should be available in the next .NET7 service release. In the meantime, as a workaround, you have to add a runtimes section to the end of /usr/lib64/dotnet/shared/Microsoft.NETCore.App/7.0.0/Microsoft.NETCore.App.deps.json as shown below:
diff --git a/Microsoft.NETCore.App.deps.json b/Microsoft.NETCore.App.deps.json.orig
index 75a6e51..eba6595 100644
--- a/Microsoft.NETCore.App.deps.json.orig
+++ b/Microsoft.NETCore.App.deps.json
@@ -733,18 +733,4 @@
"sha512": "",
"path": "microsoft.netcore.app.runtime.rhel.8-ppc64le/7.0.0"
}
+ },
+ "runtimes": {
+ "rhel.8-ppc64le": [
+ "rhel.8",
+ "rhel-ppc64le",
+ "rhel",
+ "linux-ppc64le",
+ "linux",
+ "unix-ppc64le",
+ "unix",
+ "any",
+ "base"
+ ]
+ }
}
}
After this change, rebuild and rerun the application and this time it displays the content of qcustcdt table in the QIWS schema as shown below:
dotnet build
dotnet run
The program should display the content of the qcustcdt table in the QIWS schema as below
:CUSNUM:LSTNAM:INIT:STREET:CITY:STATE:ZIPCOD:CDTLMT:CHGCOD:BALDUE:CDTDUE:
:938472:Henning :G K:4859 Elm Ave :Dallas:TX:75217:5000:3:37.00:0:
:839283:Jones :B D:21B NW 135 St:Clay :NY:13041:400:1:100.00:0:
:392859:Vine :S S:PO Box 79 :Broton:VT:5046:700:1:439.00:0:
:938485:Johnson :J A:3 Alpine Way :Helen :GA:30545:9999:2:3987.50:33.50:
:397267:Tyron :W E:13 Myrtle Dr :Hector:NY:14841:1000:1:0:0:
:846283:Alison :J S:787 Lake Dr :Isle :MN:56342:5000:3:10.00:0:
:693829:Thomas :A N:3 Dove Circle:Casper:WY:82609:9999:2:0:0:
:593029:Williams:E D:485 SE 2 Ave :Dallas:TX:75218:200:1:25.00:0:
:583990:Abraham :M T:392 Mill St :Isle :MN:56342:9999:3:500.00:0:
:123456:Wold :J K:Makle St :Rock :MN:55904:788:2:0:0: