Connect to VistaDB
Hi there,
our application needs an connection to VistaDB. Therefor we've tried to compile FastReport.VistaDB.dll as described in recent readme.txt from FRNetConnections.zip.
We use FastReport.dll 1.2.1.0. But it doesn't work. We permanently get the following errors:
1. "FastReport.Data.VistaDBDataConnection" implementiert den geerbten abstrakten Member "FastReport.Data.DataConnectionBase.GetQuotationChars()" nicht. ...\VistaDBDataConnection.cs 12 16 FastReport.VistaDB
2. Fehler 2 "FastReport.Data.VistaDBDataConnection.QuoteIdentifier(string, System.Data.Common.DbConnection)": Es wurde keine passende Methode zum ??berschreiben gefunden. ...\VistaDBDataConnection.cs 36 28 FastReport.VistaDB
What goes wrong?
Regards Claus
our application needs an connection to VistaDB. Therefor we've tried to compile FastReport.VistaDB.dll as described in recent readme.txt from FRNetConnections.zip.
We use FastReport.dll 1.2.1.0. But it doesn't work. We permanently get the following errors:
1. "FastReport.Data.VistaDBDataConnection" implementiert den geerbten abstrakten Member "FastReport.Data.DataConnectionBase.GetQuotationChars()" nicht. ...\VistaDBDataConnection.cs 12 16 FastReport.VistaDB
2. Fehler 2 "FastReport.Data.VistaDBDataConnection.QuoteIdentifier(string, System.Data.Common.DbConnection)": Es wurde keine passende Methode zum ??berschreiben gefunden. ...\VistaDBDataConnection.cs 36 28 FastReport.VistaDB
What goes wrong?
Regards Claus
Comments
Please use the latest version of FR.Net and FRNetConnections.zip. I've made some changes in the class architecture some time ago.
thanks for quick answer. Now access to VistaDB works. But a new problem came up.
We need to present data from SQL server and from VistaDB by the same frx files. We tried to achieve this by solely changing the connectionstring that we hand over to viewer control. But it doesn't work. Is there a solution?
Regards
Claus
we had
frReport = new FastReport.Report();
this.frReport.Load(sFilename); // sFilename is frx file developed for SQL server
and inserted the new lines of code
FastReport.Data.VistaDBDataConnection dbConn = new FastReport.Data.VistaDBDataConnection();
dbConn.Name = "Our_VistaDB";
dbConn.ConnectionString = @...;
this.frReport.Dictionary.Connections.Add(dbConn);
dbConn.CreateAllTables();
But CreateAllTables() throws the exeption
Error 558 (Provider v. 3.5.3.83): Invalid operand(s) data type for operator: =
Line #: 16; Column #: 21
It seems it comes from VistaDB Provider but how to fix it? Against SQL server the report works fine. And VistaDB claims to be highly compatible with SQL server.
Can You please give us an advice?
Regards Claus
Sorry, I have no idea what it may be. In FastReport, the CreateAllTables() call is inside try..catch block. Try to do the same.
we had a look at our report definition using your new designer. First we defined a query with one parameter (see pic. 1).
Then the parameter was defined. This results in an error which is shown in picture 2?
What goes wrong?
Regards Claus
Try to change the VistaDBDataConnection.cs file:
If it will help I'll include this fix into official version.
it did solve this problem and we made a step forward.
Now we're about to replace the OleDbDataConnection object by a VistaDBDataConnection object. But we're stumbled over the enumeration DataType.
It seems that every provider uses an order of its own. And if so do You have a mapping?
Regards Claus
No, we don't have a mapping method, you should implement your own one. It is essential for SQL query parameters only.
now it really works. The same frx displays data either from SQL server or VistaDB.
How do You think about a sample that shows how to programmatically build a report based on a SQL Query?
In the manual I've only found one for Datasets.
Many thanks for Your assistence
Claus
some days ago I asked wether FastReport supports data provider factories. Do You remember.
If such support is available, switching to another Database in done within one line of code.
And there is no need to replace at runtime one DBConnection type by another. A tricky thing at least from my point of view.
Once again many thanks for Your patiently support
Claus
Sorry, factories are not supported. And, I don't see a way how to implement this. Different providers use different data types, different SQL dialects etc.