Delphi 2010 Professional and remote database access - database

When looking for which version of Delphi 2010 to buy, we found the following limitation on the professional one:
Delphi 2010 Professional is designed
for developers building
high-performance desktop GUI and
touch-screen applications with (or
without) embedded and local database
persistence.
What does this really mean? Does this mean that we'll only face this restriction if we choose to use the native vcl components for database access we'll face this restriction.
And what if we choose to use ADO components instead of those? In this case, how can Delphi avoid us to access remote database servers? Did anyone here ever tried this?
Going even further: if we choose to use a database like Firebird, which is just one file, and used a network mapped drive. Could we be facing the same limitation?
Supposing we opt for ADO, what will be the main consequences?

As I understand it, they're referring specifically about dbExpress and doesn't restrict you from using dbGo or some third party library to access remote databases.

Does this mean that we'll only face
this restriction if we choose to use
the native vcl components for database
access we'll face this restriction.
Yes. The professional version simply leaves out some of the driver & driver technology that natively supports certain databases. It still includes ADO support and there are plenty of third-party drivers that you can use to access other databases.
Delphi 2010 does not include any technology to stop you from building applications that interact with remote databases aside from the fact that it does not include DB Express (its own database driver technology).

DataSnap is not included in the Pro version either. I got quite interested at a recent Delphi workshop when they showed off DataSnap only to discover when I got back that it's missing from the Pro version.
So I'm back to sticking with my SDAC components and other third party middleware components. Works perfectly without the expense of the enterprise version.
The SQL Server dbExpress driver isn't included (amongst others) but the ADO/dbGo stuff seems to work just fine over the network. But we haven't used the Delphi supplied DB drivers since Delphi 3 due to them keep changing their mind about the latest silver bullet for DB access (much like MS do/did).

Related

Delphi connection to SQL Server - 'futureproof' replacement for BDE?

we have an applcation of some size (about 1MLOC) that were started back in the days when BDE was just about to be deprecated. Nowadays we only use it to connect to SQL Server using ODBC. It has worked surprisingly well in spite of its deprecated status, and chances are it will keep on working for another 15 years. However, no one knows if or when it stops working. And if it stops, Embarcadero wouldn't be able to do much about it. So, it's a timebomb, and we need to replace it. But with what?
The ADO-components in Delphi looks promising. There are table and query components that resembles the BDE-components, and they are not third-party components made by a one-man shop that might loose interest. We also look forward to use connection-strings instead of the clunky ODBC-Administrator.
However, about a year ago Microsoft announced that OLE DB is deprecated, and for native development we should use SQL Server Native Client ODBC driver.
So, my qestion is, is the ADO-components in Delphi hardwired to OLD DB? Or would we not be using OLE DB if we select "SQL Server Native Client" in the list of drivers?
I expect/fear that to make use of the SQL Server Native Client ODBC driver, we have to set up a datasource in ODBC-Adminstrator, like we do now. Or is it possible to connect with ODBC using connection-strings?
And what Delphi-components exists that can connect to ODBC without using OLE DB?
Yes, I know about dbExpress, but it looks like it would take us years to convert to it from BDE.
Thanks,
LandShark
We had a similar migration need 5 years ago and did quite a bit of research and testing on it. The easiest migration path from the BDE is to SDAC from devart (http://www.devart.com/sdac/). Devart has a BDE replacement utility that goes through your code and replaces the BDE components with equivalent SDAC components. It will get you about 90% of the way there then you have to manually make some changes to get everything to work (e.g., if you use fetchall, have to comment out all the fetchall code - but you will see a pattern and can fix the remaining code mostly through search and replace). Performance of the SDAC components is excellent, they support all the sql server calls and you can use encrypted connections over the internet. The components support Native SQL or OLEDB connections to SQL Server. They also work in detached mode using cached updates. Another option, if you plan on supporting other database platforms in addition to SQL server is to use UniDac - it's just like SDAC but will work with SQL Server, Oracle and others - very similar to the old BDE without the overhead.
1) "native connection" does not mean use of ODBC or OLE DB, nor BDE and DBX. Native connection mean using special library that only can connect to MS SQL and that does not uses any standard server-agnostic pipileines. Contrary BDE and DBX and ADO and ODBC are generic libraries providing connection to any server you'd install plugin for.
Generally native libraries provide you closer integration with server and use of some features that generic libraries may miss (like events in firebird/interbase servers). They can also work faster for they do not need to transcode data streams and commands to/from the pipeline public API standards.
Public interfaces OTOH aid you with easier switch of servers and easier development of server-agnostic application.
2) Why do you think that BDE -> DBX conversion would be any harder than BDE -> ODBC or BDE -> ADO or BDE-> whatever ? The conversion is the conversion. ADO also has its share of limitations and gotcha's like DBX and like any other library.
3) DBX have MS SQL plugin. DevArt offers their suit of DBX plugins and may provide better one than stock Delphi DBX MS SQL support. Or maybe not.
4) Aside of those there are few well-known server-agnostic libraries
ZeosLib - FLOSS but have poor support for recent Delphi versions. Eternal alpha.
AnyDAC - http://www.da-soft.com/anydac , commercial, well-known
UniDAC - http://www.devart.com/unidac , commercial, well-known
5) you can have a lot of direct ODBC connection on any component collector site like http://www.torry.net/pages.php?id=570
6) same for native MS SQL connectivity http://www.torry.net/pages.php?id=1513
However, evaluating those choices and making your decision requires inside context knowledge that only you can have.
We had the same problem a few years ago. I suppose if there would be a perfect solution then there wouldn't be that many alternatives.
Anyway, we switched from BDE + ODBC to ADO + SQLOLEDB. The main reasons was that it was very reliable, easy to convert, didn't require anything extra to be installed on customer computers (such as BDE) and was faster than others shipped with delphi, including DBX (when using DisableControls).
Also as a side remark, if you want to use ODBC to configure the connection, you can use the ODBC manager to configure the values but read them from the registry and connect directly without ODBC. That helped us to do the switch.

Light-weight client/server DB?

I like the simplicity of SQLite, but by design, it doesn't support concurrent access. The apps I write don't have heavy needs, so I'd like to avoid heavier solutions like MySQL that are more difficult to deploy (remote customers with usually no computer personnel).
Does someone know of a good solution that would offer the following features?
Client available for VB.Net applications
The server itself doesn't have to be a .Net application. Actually, I'd rather a bare-metal server so that it can run even on embedded Linux hosts with less RAM/CPU than regular PC's
Easy install: the client part should either be statically linked inside the client application or be available as a single DLL, and the server should just be a single EXE listening for queries, à la Fossil (http://www.fossil-scm.org)
clients can locate the server on the LAN by broadcasting data picked up by the server, so users don't have to write down the IP address and paste it into each client
open-source, or moderately priced closed-source
I would recommend Firebird SQL http://www.firebirdsql.org
Can be embedded and can work as a separate server. Very little footprint with high capabilities.
Have you considered SQL Server? It scales well from Compact Edition (free, file based), through Express Edition (again, free, but requires installation) and then through the paid-for editions for when your product needs to scale further.
HSQLDB is also very leightweight, and the upcoming 2.0 release supports concurrency in form of MVCC. It is based on Java though, but there is an ODBC connector available.
You may also consider Derby... Its free and open source.

Delphi - Database Server

Which of the Database servers would you people recommend for using in a moderate-to-large scale (will vary from customer to customer) application.
I know MS SQL but since the app will be developed using delphi the .net framework is kind of annoying to deploy aswell. Also how realiable is Interbase.
Thanks in advance.
Since I have been developing in Firebird for several years now, if I were in your situation, I would look no further. The fact that you can develop your own extension library (udf library) in Delphi makes it very attractive to start with. Some of the new SQL constructs like the List aggregator and Common Table Expressions are icing on the cake. Deployment is very light (under 5 MB), and the support is excellent including incredible tools like IBExpert. I used MS SQL Server in a big company I worked at a few years ago and I would choose Firebird over MS SQL Server.
Data Access to SQL Server has nothing to do with the .NET framework. Delphi can connect just fine to SQL Server.
In terms of database engines that work with delphi, another you can consider is the Sybase Advantage Database server
Interbase is as reliable as they come. In fact, I'd like to get a job as an Interbase DBA, because I could uses the sleep.
I would definitely recommend looking at Interbase by Embarcadero or the open-source sibling, Firebird. Both are very well supported by Delphi by means of native, high-performance db-access components and such.
Interbase is a totally rock-solid database - I would put it on a par with SQL Server or Oracle. It's totally capable of handling medium to high traffic for at least 50-100 users concurrently, no problem at all.
Another two worth competitor would be Elevate DB and Nexus DB. Both grew out of Delphi file-based database systems, and both have been around for quite some time (in one form or another) and are well proven, widely used, well tested.
Marc
This seems back-to-front to me. I would choose the database server first, then select the development environment that works best with the selected database.
SQL Server. For 2005, you can make your own SQL Server deployment application that automates installing of Windows Installer 3.1, .NET Framework 2.0, SQL Server 2005 then installing the database through generatated SQL script (Feel free to contact me if you need help with it, I'd gladly help you). If you still insist on not installing .Net framework which is 22MB, I'd say go with SQL Server 2000 as you can still upgrade it to 2005+ when you'd like to.
Also, I had been using Advantage Database Server for few years and it's alright, Few DLLs to copy and you're ready to go even if you'd like to switch to remote version.
Both Server and Client installations of MS SQL require the .NET framework on the target machine. That's about it. If we can use ms sql without .net on target machine then ms sql is fine.
I have being developing in Delphi for about 6 years using distinct editions of SQL Server, and this database server behaved very very well. All of them were critical applications.
So, I would recommend you to keep with it.If you don't want to use .NET with and keep SQL Server I would recommend an older version pre-2005.
This isn't really an answer, but some things you might like to consider before making your mind up.
What do you mean by moderate-to-large scale? Do you mean by the number of concurrent users or by the amount of data being stored?
Are you going to be supporting the database as well when it's deployed, or might the customer have their own DBAs and want to incorporate it into their infrastructure team's remit?
Do you need to build-in complex features like auditing or granular security that some databases might provide out-of-the-box? Do you need to be able to run an overnight batch process on the database in some controlled manner?
Do you need to be able to have robust high-volume transactional support, or is it more for just using as a sink for reporting data? i.e. is it more OLTP or OLAP?
Are you limited by cost? i.e. does it need to be free/open-source, or can you select paid-for vendor product?
Both Firebird & Interbase are great, but not generally well-received into an "enterprise" environment in my experience unless they're "hands-off" and embedded into the application. MS SQL Server is a "safe-bet" for most systems. There is a cost associated with it but, as you know, it does come with a complete toolset and very good support.
If you do go down the Firebird or Interbase route then do take a look at Jason Wharton's IBObjects library which provides a high-performance replacement for BDE when using these databases. http://www.ibobjects.com/

PowerBuilder app with embedded database?

Is it possible to use e.g. SQLite with PowerBuilder? I need an embedded open source database (no additional costs).
Like Bernard said, you'll need an ODBC driver, so as long as you're willing to go third party (if I understand the SQLite situation correctly), that should be no problem.
That said, if you have PowerBuilder, you have license to distribute the single-user SQL Anywhere run time engine. If no-cost is your only criteria, and you're only connecting locally, SQL Anywhere may be an option to evaluate. Not only is it an incredibly solid database, but there's a much larger base of documentation and experience connecting PowerBuilder to SQL Anywhere, so if you run into problems, you're more likely to get some help.
Good luck.
I don't believe that PowerBuilder contains a driver for native support to SQLite. But it definitely has a driver for ODBC, so that is always an option even if it isn't the most efficient one.
I used to use SQL Anywhere, but eventually ditched it for the reasons Joe Landau gave - can't change the schema using the distributable runtime engine.
I switched to Firebird, which has an embedded version, and that seems solid. The only issue is that the ODBC driver I'm using (Gemini), which seems to be the best one available, seems to have gone out of business. (I just checked - it seems to be available on other sites.) And you have to add the following to your PBODB*.INI file:
[Firebird]
PBSyntax='Firebird_SYNTAX'
PBNoCatalog='YES'
[Firebird_SYNTAX]
CreateTable='CREATE TABLE &TableName (::ColumnElement[::ColumnElement]...)'
ColumnElement='&ColumnName &DataType'
DropTable='DROP TABLE &TableName'
GetIdentity='Select gen_id(GEN_&TableName,0) from RDB$DATABASE'
I've been very happy with it. Using it for almost 2 years, with over 1,000 users, and no problems whatsoever. You can also easily switch to the Firebird server version if some users need that.
As noted, SQL Anywhere is available and solid. But it has a disadvantage--you can't change the schema using the run time engine. This makes it hard to, say, add a column to a db that you have distributed.
++ to the comments by DC on Firebird. One of the best free databases out there. I have used it for years for a PB application I sell to Law Firms.
Although I use the server version even if the target is a single workstation. Simplifies the deployment and the issue of adding workstations later if desired.
I use the standard Firebird ODBC driver at http://www.firebirdsql.org/index.php?op=files&id=odbc
There are two good GUI front database management tools that I hve used - IBOConsole and Flamerobin.

Choosing a desktop database

I'm looking for a desktop/embedded database. The two candidates I'm looking at are
Microsoft SQL Server CE and Oracle Lite. If anyone's used both of these products, it'd be great if you could compare them. I haven't been able to find any comparisons online.
The backend DB is Oracle10g.
Update: Clarification, the business need is a client-server app with offline functionality (hence the need for a local data store on the client)
If the backend database is Oracle 10g it will probably be easier for you to use Oracle Lite - that way you don't have to use two completely different SQL dialects in the same project.
BTW, In my product I use SQLite as the desktop database
I'll second the vote for SQLite. I'm not sure what you're trying to accomplish but if you're doing any sort of local storage with syncing SQLite is a good choice. It has very widespread adoption and a lot of community support.
I also used SQLite as a desktop database. It's lightning quick and doesn't need a seperate process or any prior installation. All you need is a library to access the data as part of your code.
In light of your clarification I'd evaluate both OracleXE and Oracle 10g Lite before the others. Stick with the same tech, SQL/Oracle have some funny disagreements about SQL syntax and datatypes. I imagine you'd get the same issue with SQLite.
Perhaps I'm not fully understanding the need here. You are developing against 10g, but for your own test/dev environment you want a more lightweight database?
Or, are you developing an application that synchs with 10g database when online, but when offline uses a local store?
In both cases, I'd recommend staying with Oracle only because it will simplify your code.
In the first case, I'd wonder why you don't have a 10g QA machine somewhere that all the developers can connect to.
One advantage you have with SQL Server CE is that it is free and you can use the Sync Framework to syncronize it with any ADO.NET accesible database.
Also, the same SQL CE file is usable from the PC and mobile devices, and if you develop your application using .NET, you can use the same code for the desktop and the mobile device without changes.
You might want to look at Oracle XE. I cannot remember all of the differences, but O-Lite didn't fit my project needs. Oracle XE is a very good database for local development.
Brad
As #Nir mentioned, it's better to have homogeneous environment. However if you decide to not use Oracle Light, I would highly recommend you to take a look at Firebird. It's one of best choices for desktop database scenarios.

Resources