I ran the DA new app wizard and created a new DA custom server in Delphi. The base template code works well until I try to convert the app to a code-first server. The first problem I had was in LoginService_Impl.pas . When I tried compiling I got the following error:
[dcc32 Error] LoginService_Impl.pas(103): E2250 There is no overloaded version of ‘RegisterCodeFirstService’ that can be called with these arguments
that was caused by this line in the initialization section of the unit:
RegisterCodeFirstService(TLoginService); // fake declaration for RTTI
After commenting out that line I was able to compile. However, I cannot get any clients to connect to the custom server. Even the new client wizard cannot connect to the server. I get the following error:
Cannot retrieve server Schema:
RemObjects.SDK.Types.ServerException: An exception occurred on the server: Error reading parameter aLoginString: Stream read error at RemObjects.SDK.Messa…
Are code-first DA servers possible? Any suggestions as to what is wrong or where to look?
BTW: YES I am using the latest version of DA/Delphi and I am using the latest version of RADStudio 10.2 Tokyo Enterprise.
Those changes did fix the two issues I had with the converted code.
Unfortunately I now have a new error when connecting.
Cannot retrieve server Schema:
System.Xml.XmlException: Name cannot begin with the ‘.’ character. hexadecimal value 0x00.
Line 1, position 2. at System.Xml.XmlTextReaderImpl.Throw(Excep…
Any suggestions on this one?
Also, where can I log some other minor bugs I have found?
Is the fix suppose to be in the current release, or is it in a newer upcoming release? The reason I ask is that I am using the latest version of DA/Delphi and the template as supplied is currently broken.
I am using Delphi for everything at the moment. And the issue is when using the client template wizard. I haven’t even gotten to the point of having a client. (I am trying to create a separate client project to learn how that process works.) I have not yet tried the one created when the server was created.
Copying the contents from your test case’s DataService_Impl.pas file has fixed my server issues.
The convert to code-first menu item obviously is not converting everything that is needed for a DA code-first server. Is there a fix planned for that in the future?