Lemon Posted March 21, 2004 Posted March 21, 2004 I'm trying to do the folowing query: MyCommand = New OleDbCommand("SELECT id FROM wedstrijden ORDER BY id DESC LIMIT 0,1", MyConnection) MyReader = MyCommand.ExecuteReader() MyReader.Read() But then i get an error: An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll I'm very sure that the table name enc is correct. When i try this, everything works: MyCommand = New OleDbCommand("SELECT id FROM wedstrijden ORDER BY id DESC", MyConnection) MyReader = MyCommand.ExecuteReader() MyReader.Read() So the problem is the LIMIT, i am used to this thing in sql with php. Is it possible that it doesnt work in de sql query with an acces db? Quote
JABE Posted March 26, 2004 Posted March 26, 2004 Afaik, LIMIT is proprietary to the mySQL database. Quote
*Experts* Nerseus Posted March 26, 2004 *Experts* Posted March 26, 2004 You could say "SELECT TOP 1 ...". I'm not sure if that's what the LIMIT thing does... -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.