Accessing sql server temporary table from

What I am missing to get data from temporary table. This is showing error like Invalid object name #emp. Please help me I am using

 Dim sqlcmd = New SqlCommand("select * into #emp from employees", conn)

 sqlcmd = New SqlCommand("select * from  #emp", conn)
 Dim dr As SqlDataReader = sqlcmd.ExecuteReader

See Above query is working fine and data is going into temporary table. but it is not selecting again through second one query.



Try to use Global Temporary table instead of Local Temporary tabel like.. ##emp


you can Just use StoreProcedure which has all the Sql statement you want to execute and return your desired Recordset.

Need Your Help

profiling a sample program of JAAS

java exception profiling jaas

I am trying to profile a sample program of JAAS which is here.( I downloaded the code and run it. Without profiling it runs just fine. The comma...

Why are these Images bigger then origional size?

javascript jquery css image

I have multiple images that I pull from facebook. They are placed in a scroller. When you click on the image a dialog appears with the actual image (The images in the scroller are thumbnail size, w...