Forum > Database

Error in ZMSQL with column names containing diacritics

<< < (3/3)

maurobio:
@wp,

Here it its. As you can see, this works fine (without diacritics in the column names).

Thank you!

With best wishes,

wp:
Yes, and when I add the FixFieldNames code that I sent in a previous post this code works also with diacritics in the xls file - of course this is as expected.

But when I remove the auxiliary csv file and copy the worksheetdataset to the zmsqlquerydataset directly, like in the following snippet, there is the "inactive dataset" error again.

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm1.Button1Click(Sender: TObject);begin  (*  CSVExporter1.FileName := 'PlantList.csv';  CSVExporter1.Execute;  ZMQueryDataset1.LoadFromTable;  *)  ZMQueryDataset1.CopyFromDataset(sWorksheetDataset1);end;
Something must be different in the ZMSqlDataset depending on whether it is populated via a CSV file or via CopyFromDataset.

maurobio:
Hi, @wp!


--- Quote from: wp on October 21, 2021, 11:38:47 am ---Something must be different in the ZMSqlDataset depending on whether it is populated via a CSV file or via CopyFromDataset.

--- End quote ---

I did already suspect that, because when I tried to use CopyFromDataset in my application, it broke, so I did stick to CSVExporter which works fine.

I will try again with your FixedFieldNames routine.

Thanks a lot!

With best wishes,

Navigation

[0] Message Index

[*] Previous page

Go to full version