You are not logged in.
Pages: 1
Good idea,
Good idea,
Welcome to Linux world !
Hi, mpv,
I also notice this message.
I am finding solution that not depends on M$ (always kidding to developer, M$ always builds a house and then destroy : > )
But some existing apps using M$SQL, need to maintain.
Please point me to using ODBC with example.
Thanks.
Mark
Hi ! AB,
I have solved the MSSQL2019 issue.
MSSQL2019 Server need the previous version sql native client 2012 to work .
Update you.
https://stackoverflow.com/questions/760 … sql-native
https://www.microsoft.com/en-us/downloa … x?id=50402
BTW, I want to cross platform deployment, I have tried DBZeros connection, but not success.
It seems not easy to implement?
Mark
Hi, AB
I have upgrade to win11 with SQL2019, installed "Microsoft OLE DB Driver for SQL Server".
But, when the win32 client to Rest server showing "Internal Server Error".
It's OK when MSSQL2016 in Win10, installed "Microsoft OLE DB Driver for SQL Server".
my connection code:
aProps := TSqlDBOleDBMSSQL2008ConnectionProperties.Create('tcp:127.0.0.1,1433','DB','Name','Password');
aProps := TOleDBMSSQL2012ConnectionProperties.Create('tcp:127.0.0.1,1433','DB','Name','Password');
aProps := TSqlDBOleDBMSSQL2018ConnectionProperties.Create('tcp:127.0.0.1,1433','DB','Name','Password');
I have tried 3 versions, always shows "Internal Server Error".
See the Log:
0000000000772D1F ' SQL mormot.db.sql.oledb.TSqlDBOleDBConnection(05510710) SELECT * FROM TABLE1
0000000000772D27 ' EXC EOleSysError 0x80040154 {Message:"Class not registered"} [HttpSrv 8080apps prog THttpApiS] at 01002ba3cf
What's wrong in my coding ?
Thanks for your help.
Mark
That function only changes folder location but not URI.
It is my I misunderstand.
I choose to use the default ".static" folder. : )
Thanks Ab
The new update program could complie ViewStaticFolder := 'ccc',
but my browser could not access file under "Views/ccc/blog.css"
Code:
MvcViewsAbstract := TMvcViewsAbstract.Create(Factory.InterfaceTypeInfo, (RestModel as TRestServer).LogClass);
loMvcViewsAbstract.ViewStaticFolder := 'ccc';
fMainRunner := TMvcRunOnRestServer.Create(Self,nil,'',MvcViewsAbstract);
>>For instance, didn't you change the ViewTemplateFolder value?
I use default folder "Views" with Default.html
When I debug, (lazarus GDB always abort in some object. eg. fViews)
I find something strange but the GDB abort, It cannot show in depth ---broken then stop dialog.
I find that the result of if length(files) >0 then --> false
so, goto the block to create a new html template
I suspect FindTemplates() cannot get Default.html contents.
where SearchPattern --> Default.*
code:
mormot.rest.mvc
line 1169 files := FindTemplates(SearchPattern);
line 1170 if length(files) > 0 then <-- false
Still clean my pre-set html templates when run the MVC Server program.
Is it wrong code calling?
Code:
fMainRunner := TMvcRunOnRestServer.Create(Self);
Yes, I have studied comment several times and tried,
it could change the "Views" folder to other name.
BUT, the ".static" folder couldn't because it is read-only property, couldn't write value.
from code:
property ViewStaticFolder: TFileName
read fViewStaticFolder;
Hi, Ab.
Could change the Views folder to others? (eg. "wwwroot" folder)
Could change the .static folder to others? (eg. "resource" folder)
Thanks
Hello Ab,
I face a problem that how to register a folder like as "wwwroot" in web app,
also "Cache" folder too
I am using method based SOA
so that I would place all the js, css, ico, img for <link> in index,html
(eg. <script src="static/js/jquery.min.js"></script>)
Please point me the right direction, thanks
Hello, Ab,
The issue still remain.
I build the MVCServer sample, it is success to generate MVCServer.exe in folder "exe".
But when I run the exe,
I find that all html files (under folder Views) content updated with default void statements "{{! void template created" .
That means all the existing *.html content cleared (eg. <!DOCTYPE html> ... >> {{! void template created for the xxx.yyy View: ...)
I check the log, find:
0000000000000619 ! warn {"TMvcViewsMustache(01510930)":{}}.Create: Missing View file in Default.* << Already exists Default.html in Views folder, why cannot find?
00000000000007C4 ! warn {"TMvcViewsMustache(01510930)":{}}.Create: Missing View file in Error.* << Ditto
00000000000008E7 ! warn {"TMvcViewsMustache(01510930)":{}}.Create: Missing View file in ArticleView.* << Ditto
0000000000000AAD ! warn {"TMvcViewsMustache(01510930)":{}}.Create: Missing View file in AuthorView.* << Ditto
0000000000000C2D ! warn {"TMvcViewsMustache(01510930)":{}}.Create: Missing View file in ArticleEdit.* << Ditto
Win10, Mormot2 (2.0.4099), FP (3.2.2), Laz (2.2.2)
Please help !
Hi ab,
I find a strange issue since recent update of Mormot2 (2.0.4099), Win10.
The MVC Server (from your example) with fMainRunner := TMvcRunOnRestServer.Create(Self);
It always overwrites my existing html template in folder "Views" (eg. HTML file content is about -> {{! void template created for the IWebApplication.xxx View: )
Any settings need ?
Thanks
Thanks AB
I start to familiar with mORMot, thanks your right direction!
To understand your materials with solid example will be more efficiently
because sometimes not fully understand your good theory & idea explaination (may be my low IQ),
but understand quickly when view related examples and think back again.
Thanks AB,
I also have a confuse about SOA,
SOA as micro service to handle simple function (may be 1 function of logic),
In the real case, there are hundreds of functions within a business system,
that means hundreds of SOA created within a system ?
If yes, it is the pain-point to handle these hundreds of SOAs' admin (eg. start/ end services, ...)
Mark
Thank AB,
I download "libmariadb.dll" and use Zeos, success to connect and retrieve JSON via browser
Also use unidac to connect, it is success!
I have a question, I have existing mariaDB tables which contains 1 or multiple keys fields,
But mORMot model create "ID" automatically, how to suit my existing tables key-fields (I don't want to change my exisitng table structure because many users using these.
Thanks for your help
Mark
Hi, AB
Do you plan to support direct with MariaDB in mORMot ?
because MariaDB is a Nova in RDBMS in the coming future.
many cloud provider also provide this RDBMS.
So, It is good for system development in mORMot.
In your exmple, I have tested well with MSSQL2008R2 Express connections, but it is limited by MS other than paid license fee. not as good as MariaDB(Open& cross platform that means run in Linux).
Thanks.
Thanks AB point me the right way.
How about MariaDB connection, I get cannot find any example, or fail when modify the mssql example.
any hints to me, thanks your help
Dear AB,
I know Mormot before and also play the examples it is a great tools for Delphi developer,
Thanks your efforts, delphi developer still has place to survival under web trends.
However, I get confuse in Mormot.
Our company develops a program in traditional Client/Server mode.
Now, my boss ask to change to web-based program,
I think the client interface use HTML+CSS+Jquery
and the database server use MariaDB,
how about application server apply Mormot?
diagram: <DBServer> -- <Mormot: SOA/ ORM ? > -- <Web UI>
As I know SOA with interface(client/server), need delphi client, it is not suit the above case.
ORM only to map DB tables/fields to entity.
My request is Mormot need:
1.) contains functions (web UI request -> logic process with DB data -> return simple result array)
2.) process SQL (web UI request -> update/insert/delete SQL to DB server)
3.) I never success to connect MariaDB until now, Mormot support MariaDB ? any example ?
Win10
Delphi XE7
MariaDB 10.0.2 or above
Please any suggestion to build the system base on Mormot.
Regards
Mark
Pages: 1