Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid Object Name
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Invalid Object Name
Divers
Thread ID:
01478705
Message ID:
01478705
Vues:
81
I am getting an invalid object name when trying to select out of a Temporary table:
Code Is:
string sSQL4;
sSQL4 =
"SELECT FIELD12,AcNum,Delref into #Tempy1 FROM BI.dbo.BI01 WHERE SUBSTRING(STGROUP, 1, 2) = " +
textGroup.Text +
" AND (PERIOD = " + TextPeriodFrom.Text + ")" +
"GROUP BY FIELD12,AcNum,Delref ";
OleDbCommand cmdCount = new OleDbCommand(sSQL4, conn);
OleDbDataReader rdrCount = cmdCount.ExecuteReader();

string sSQL5;
sSQL5 =
"SELECT Field12,Count(FIELD12) as MyCount from #Tempy1 group by Field12 ";
OleDbCommand cmdCount2 = new OleDbCommand(sSQL5, conn);
OleDbDataReader rdrCount2 = cmdCount2.ExecuteReader();

The rdrCount2 gives the error when executing. Also Tried ##Tempy1 ..same error

TIA
Gerard
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform