Created a Miletus Web application, dropped TMiletusMSSQLDBDriver and TMiletusClientDataSet components on the form. Configured Server, UserName, Password for the MiletusMSSQLDBDriver. Assigned the dbdriver component to the ClientDataset DBDriver property, set Active property to true. When double clicked the ClientDataSet I get the following error:
[FireDAC][Comp][Clnt]-340. Driver ID is not defined. Set TFDConnection.DriverName or add DriverID to your connection.
What course of action should I take to overcome the problem?
At this moment we could not enable design-time support for MS SQL due to the differences between Delphi Professional and Delphi Enterprise/Architect licenses.
I assume you would implement this functionality in an upcoming version.
I ran the program but can not seem to get data from the SQL server. How do I configure MiletusMSSQLDriver properties to get data into MiletusClientDataset?
Can you provide an example source for the pas and dfm of a working program ?
procedure TForm1.MiletusFormCreate(Sender: TObject);
begin
//For example server URL or 'localhost\YOURSERVER'
MiletusMSSQLDBDriver1.Server := 'your server';
MiletusMSSQLDBDriver1.DataBase := 'your db name';
//Set OSAuthent to true if you are on localhost and want to use Windows authentication
MiletusMSSQLDBDriver1.OSAuthent := True;
//If OSAuthent is False, you'll need to set UserName and Password:
MiletusMSSQLDBDriver1.UserName := 'username';
MiletusMSSQLDBDriver1.Password := 'password';
//Primary key field of your table (if any)
MiletusMSSQLDBDriver1.IndexName := 'id';
MiletusClientDataSet1.DBDriver := MiletusMSSQLDBDriver1;
//Query the contents of the table
MiletusClientDataSet1.QueryText := 'select * from test;';
WebDataSource1.DataSet := MiletusClientDataSet1;
WebDBGrid1.DataSource := WebDataSource1;
end;
procedure TForm1.WebButton1Click(Sender: TObject);
begin
//After setting to true, the WebDBGrid will be filled with your table's data.
MiletusClientDataSet1.Active := True;
end;
Apart from setting the MiletusClientDataSet1.Active property, you can configure everything else at design-time.
I followed the steps you described but have not been successful. I am not getting data to the grid, but I can see the component is sending the SQL commands as you can see in the attached file called “SQL profiler.png”.
The setup you made looks OK as the connection could succeed and the query string was also sent. What does your company table structure look like? Does it contain binary or any special fields?
If there's nothing special about your table, then you can try to eliminate the issue by adding the fields one-by-one to the FieldDefs and see when it stops working.
Also the collation is Turkish_ci_as for the database and Turkish_cs_as for the text fields in the company. However some fields could be database default.
I have found the culprit. It is the WebDBGrid that is the problem.
If I just select one field (does not matter which one) in the sql statement it returns data in 5 seconds, 2 fields 28 seconds. It keeps compounding the time it requires to populate the WebDBGrid. So no wonder I do not see anything when Select * used and 45 fields are returned.
I replaced the webdbgrid with fncgrid and it shows 5000 records in about 3 seconds.
Initially I was using 1.7.0.1 version when I tested. After I corresponding with support (on May 4) I noticed 1.7.1.0 was published. I downloaded and installed that version and restested using WebDBGrid again.
The results were not much improved from the previous version. FNCGrid is superior in speed. I wish the WebDBGrid was equally fast. You could test yourself with a simple test case yourself.