Hi all,
Google search engine brought me here. I am so desperated and hope you guys could give me some help. This is my first .NET project to connect to AS400 database. I used Microsoft.Data.Odbc, and was able to connect to the database with no problem. Next I want to generate a report where I need to query many different tables and do pivotting on the dataset ... So I decide to save some of the dataset to a temp table, and I was able to do so. However, I couldn't access any of those temp tables. I know they are saved in QTemp database, but I don't know how to connect to them.
Could you guys give me some hints, please? Thanks so much.
Here is my code. The create table part works, but I can't insert or select
-------------------------------------------------------------------------------------------------------
oCon = New OdbcConnection("Dsn=PRODUCTION")
oCmd = New OdbcCommand()
oCmd.Connection = oCon
oCmd.CommandText = "Declare Global Temporary Table MyTest (" & _
"IEITM NUMERIC(8,0), " & _
"IELEDG CHARACTER(2)) on commit preserve rows"
oCon.Open()
oCmd.ExecuteNonQuery()