HomeActive Query BuilderSQL Server 2008 Syntax

SQL Server 2008 Syntax

Are there plans to support SQL Server 2008 syntax directly in TacMSSQLSyntaxProvider.ServerVersion? Auto-detect seems to work correctly but it seems strange that SQL Server 2005 is an option but 2008 is not?
Andrew Clark | email
February 9 2011, 09:59 PM
Dear Andrew,

Please download the latest version.
Sergey Smagin | email
1 day, 6 hours since original post
I did search the forums looking to see if the 2008 support was mentioned somewhere and I didn't see it - I apologize if I missed that somewhere. I did download the new version and there is now a svMSSQL2008 constant, thank you very much.

However, with the new version my application now won't compile. This line of code:

dataset := fQueryBuilder.MetadataProvider.ExecSQL(sql);

...doesn't compile - looks like the ExecSQL method no longer has a return type of TDataset - it actually doesn't seem to return anything (void) now?? Am I doing something wrong or has something changed (the AQB help still says it returns TDataset) or do I need to put back the previous version (I think that I had 1.13 before).
Andrew Clark | email
2 days, 14 hours since original post
There is a ExecSQLDatasetUR() method which looks like it is the same thing - I replaced ExecSQL with it and it seems to work ok is that right? I also have this line of code:

dataSet := MetadataProvider.PrepareSQLDataset(sql);

I don't really see a method that is similar to that. There is a CreateSQLDataset() method but it doesn't have a sql parameter?? What should I use to replace that call?
Andrew Clark | email
2 days, 15 hours since original post
I also just tried to download the demo version to see how the 2008 syntax (and other syntaxes?) have been added and it looks like the authority isn't set right:


You don't have permission to access /files/aqb_demo.zip on this server.

Andrew Clark | email
2 days, 15 hours since original post
Dear Andrew,

new version you downloaded allows creating read-only and unidirectional datasets (and now Active Query Builder prefer using unidirectional read-only datasets to minimize used resources). If you need to execute some SQL and get results into TDataset, use the following code:

// create a dataset
dataset := metadataProvider.CreateSQLDataset(unidirectionalFlag, readOnlyFlag);
// write SQL and parameters (if any)
// open dataset
dataset.Active := true;

The ExecSQLDatasetUR is a helper which create unidirectional read-only dataset, set up SQL and open it.

PS Thank you for the file permissions report, it is fixed now
Vitaly Sotnikov | email
4 days, 4 hours since original post
This topic is closed