Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 5 of 5 total |
Select TOP ? |
Fri, Aug 3 2012 10:47 AM | Permanent Link |
Rafael | Hi, i'm using the following to select all rows from a column:
test_sql = "select * from table" set test = objconexao.execute(test_sql) It works OK. Now, when trying to limit it to a specific number of rows, a problem happens: test_sql = "select TOP 5 * from table" set test = objconexao.execute(test_sql) Error message: Microsoft OLE DB Provider for ODBC Drivers (0x80040E09) [Elevate Software][DBISAM] DBISAM Engine Error # 11949 SQL parsing error - Expected FROM but instead found 5 in SELECT SQL statement at line 1, column 12 What am I doing wrong? |
Fri, Aug 3 2012 11:31 AM | Permanent Link |
Robert Kaplan | <Rafael> wrote in message news:EA7E87C3-551C-422E-A055-3B600203769B@news.elevatesoft.com... > Hi, i'm using the following to select all rows from a column: > > test_sql = "select * from table" > set test = objconexao.execute(test_sql) > > It works OK. > > Now, when trying to limit it to a specific number of rows, a problem > happens: > > test_sql = "select TOP 5 * from table" > set test = objconexao.execute(test_sql) > > Error message: > > Microsoft OLE DB Provider for ODBC Drivers (0x80040E09) > [Elevate Software][DBISAM] DBISAM Engine Error # 11949 SQL parsing error - > Expected FROM but instead found 5 in SELECT SQL statement at line 1, > column 12 > > What am I doing wrong? > select * from table top 5 Robert |
Fri, Aug 3 2012 11:42 AM | Permanent Link |
Rafael | Thanks Robert! But now it returns this error:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Elevate Software][DBISAM] DBISAM Engine Error # 11013 Access denied to table or backup file '12320' The DB is located in my local computer, actually. Do you know why this is happening? It's strange that this error don't happen when i just select all the rows, not specifying "top". |
Fri, Aug 3 2012 11:58 AM | Permanent Link |
Raul Team Elevate | it's either folder permissions or more likely antivirus interfering - when you're doing a TOP then you no longer have a live resultset so DBISAM needs to build a temporary table with the results for you (hence the random temp name of 12320) and then it would delete it after. However it either is unable to create the file (folder permissions) or after it's created AV locks it and DBISAM can't open it again
Raul Rafael wrote: Thanks Robert! But now it returns this error: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Elevate Software][DBISAM] DBISAM Engine Error # 11013 Access denied to table or backup file '12320' The DB is located in my local computer, actually. Do you know why this is happening? It's strange that this error don't happen when i just select all the rows, not specifying "top". |
Fri, Aug 3 2012 12:07 PM | Permanent Link |
Rafael | Thanks a lot Raul! I'm very glad for that.
I needed to set up permissions for the Windows\Temp folder. Now it's working! |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |