HOME > ASP > ASP Forum > Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'FROM'
Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'FROM'
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'FROM'.
sql = "SELECT TOP 1 FROM orders ORDER BY OID DESC"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 1,3 <------------------------------------------- Error ตรงนี้ครับ
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 &")"