Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question about use of temp tables in Oracle...
Message
De
29/08/2002 17:42:00
 
 
Information générale
Forum:
Oracle
Catégorie:
Autre
Divers
Thread ID:
00694954
Message ID:
00695211
Vues:
10
Hi, Larry...

Thanks for your response. Let me ask this a different way...we need to support both SQL Server and Oracle, so we're doing as much in the middle tier as possible. We're not using any stored procs...

What some of this boils down to is the following...will the following code work in Oracle?

MyConn = OleDbConnection("connect string for either Oracle or SQL");
MyConn.Open();
OleDBCommand oCmd = new OleDbCommand("CREATE TABLE #GeoList (GeoKey INTEGER)",MyConn);
oCmd.ExecuteNonQuery();

OleDbCommand oCmd2 = new OleDbCommand("INSERT INTO #GeoList (GeoKey) VALUES (100)");
oCmd2.ExecuteNonQuery();

MyAdapter = new OleDBAdapter("SELECT * FROM History JOIN #GeoList ON History.GeoKey = #GeoList.GeoKey",MyConn);
DsReturn = new DataSet();
MyAdapter.Fill(DsReturn,"myhistoryextract");
MyConn.Close();

This type of code runs fine when connecting to SQL Server...my question is whether it would run equally fine when connected to Oracle.

If so, that's great. If I'd have to make minor tweaks to the syntax, so be it. But if this kind of approach can't be done, I'm totally screwed!

Being able to have the app create temp tables on the fly, based on user selections, before running a report is a requirement of our app.

Kind of makes me wish I could use FoxPro again! ;)

Thanks,
Kevin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform