DA Server/Delphi - Issue with Azure SQL Server

Hello,

I am trying to create a new custom DA Server with Delphi. When I run the wizard I can connect to my Azure SQL Server database just fine. The table names are retrieved and all appears to go well. When the new VCL project is created I get the following messages in the IDE message window:

Error: ServerSchema was not processed due to internal exception: System.ArgumentNullException: Value cannot be null. Parameter name: s at System.IO.StringReader…ctor(String s) at System.Xml.XmlDocument.LoadXml(Strin…
Error: ServerSchema was not processed due to internal exception: System.ArgumentNullException: Value cannot be null. Parameter name: s at System.IO.StringReader…ctor(String s) at System.Xml.XmlDocument.LoadXml(Strin…

When I check the schema for the DataService there are no tables listed even though I specifically told the wizard to add them. If I try to add a table via drag and drop in the schema editor I get the following error:

and at one point I got this error when I tried to create a new schema using the schema editor:

My RemObjects product data is:

I am using RADStudio 10.2 Tokyo and I have tried this using both UniDAC and FireDAC. Any help would be greatly appreciated.

Thanks

looks like Azure SQL Server doesn’t contain this stored procedure or you have no rights for execution it.

some workarounds:

  • complex solution. update uDAADOInterfaces.pas as
procedure MSSQL_DoGetTableFields(const aTableName: string; Query: IDAServerDataset; out Fields: TDAFieldCollection);
...
    Query.Close;
    exit; //<<<<< added
    Query.SQL := 'exec sp_MShelpcolumns '+QuotedStr(aTableName)+', null, ''id'', 1;';

and recompile drivers what you are using: DAFireDACDrv.dpr and DAUniDACDrv.dpr.
created .dad should be put into C:\Program Files (x86)\RemObjects Software\Data Abstract (Common)\Bin folder
Note: received table info may be inaccurate and may require validation

or

  • create table fields manually. it can be the easiest solution if you need to have access to few tables

HI Evgeny,

I just created a new blank Azure SQL Server database (not in a VM) and then checked what stored procedures were added by default. sp_MShelpcolumns is NOT in there. There are a whole bunch of stored procs that are not in there that are in a database created under SQ Server when run on a local server or in a VM. There are definitely differences between the Azure version of SQL Server and a standard SQL Server install. You may want to investigate how to support Azure’s version too.

Thanks, logged as bugs://77966

I’ve logged issue for investigation

bugs://77966 got closed with status fixed.