Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid Object Name
Message
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Invalid Object Name
Miscellaneous
Thread ID:
01478705
Message ID:
01478705
Views:
80
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
Next
Reply
Map
View

Click here to load this message in the networking platform