Skip to Content
0
Former Member
Jul 12, 2012 at 12:29 AM

Drop Temporary Table

73 Views

Hi

I'm doing an aplication with the SAP Business One SDK but

i don't now if i can use objects of Sql to remove a Temporary Table

The Code that I try use is...............

oConexionSQL = New SqlConnection(sCadenaConexion)

oComandoSQL = New SqlCommand

oComandoSQL.Connection = oConexionSQL

sQuery = "if not OBJECT_ID('" & sNombre_Tabla & "') is null DROP TABLE " & sNombre_Tabla

oComandoSQL.CommandText = sQuery

oComandoSQL.ExecuteNonQuery()

oConexionSQL.Close()

Someone can answer me

Thanks