Calling .NET libs from Delphi?
Calling .NET libs from Delphi?
Basically, I'd like to call sql generators from .NET System.Data.SqlClient, like it is done here:
http://scriptdb.codeplex.com/SourceControl/latest#ScriptDB/DatabaseScripter.cs
How much bending over backwards is required to to do this?
#sql
Basically, I'd like to call sql generators from .NET System.Data.SqlClient, like it is done here:
http://scriptdb.codeplex.com/SourceControl/latest#ScriptDB/DatabaseScripter.cs
How much bending over backwards is required to to do this?
#sql
RemObjects Hydra?
ReplyDeleteToo much luggage. Need something less generic.
ReplyDeletehttp://ww2.atozed.com/CrossTalk/index.html
ReplyDeleteWho's the author, Lachlan Gemmell?
ReplyDeleteCT looks interesting!
It's AtoZed Software of IntraWeb fame. I haven't used it personally.
ReplyDeleteJust for completeness
ReplyDeletehttp://www.managed-vcl.com/
Honestly the first thing I'd try is to just import the assembly in Delphi. Failing that I'd try exposing the functionality as a COM compatible wrapper and import that.
Only after failing at both of those would I spend money on one of the third party libraries.
It's also possible to do straight from Delphi but with a fair bit more mucking around.
ReplyDeletehttp://www.blong.com/Articles/DotNetInteropD8/Interop1/Win32AndDotNetInterop.htm
Haven't tried it but this can help: http://adamjohnston.me/2013/04/14/delphi-dotnet-interop-with-jvcl/
ReplyDeleteIf you need to do this from the IDE, it's already a CLR host. There used to be some meager documentation on the interfaces they expose for assembly extension writers (more or less mirrors the interfaces exposed for native extensions) but I'm sure one of the many IL "reflector" tools out there would be more thorough.
ReplyDeleteKenneth Cochran - Not from the IDE, although that could have it's uses too.
ReplyDeleteLars Fosdal I've wrote something simple using RTTI, basically it creates the SQL dynamically and executes on connection, works noicely with pg and sqlite -- can't share code ): -- but this requires published properties and attributes on fields and "table" object, however, it can switch db type and see "new tables" and create them all in a few lines of code.
ReplyDeleteneed a light install? use sqlite, need a hardcore install? install pg, run the app => database and default records created (:
With databases that run into tens of gigs, hardcore is a must.
ReplyDeleteCrossTalk comes with an installer and the eval is really simple to try out. The import utility can show you before "importing" what types it can not handle. If the .net stuff is too convoluted (unmanaged EWS for an example) i usually write the bulk code in VS Express and put some simple interfacing methods that i import and call from Delphi.
ReplyDelete