Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]The name '##' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
sql = "SELECT TOP 1 FROM orders ORDER BY OID DESC"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 1,3
if RS.Recordcount=0 then
OID = 0
else
OID = rs("OID")
end if
OID = OID + 1
sql = "insert into orders (oid,name) " & _
"values ("&oid&","& name &")"