Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

  • *Experts*
Posted

You could say "SELECT TOP 1 ...". I'm not sure if that's what the LIMIT thing does...

 

-Nerseus

"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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...