WPF app and DBF file

This forum is meant for questions and discussions about the X# language and tools
Juraj
Posts: 161
Joined: Mon Jan 09, 2017 7:00 am

WPF app and DBF file

Post by Juraj »

Hi All,

I want to open an existing dbf file in the wpf app, create a new dbf file with the same structure and transfer the selected records into new dbf. Which XSharp Dll need to be added to the WPF app (Core dialect)?

Juraj
User avatar
wriedmann
Posts: 3644
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

WPF app and DBF file

Post by wriedmann »

Hi Juraj,
it depends if you are using the DBServer or the functional access.
For the functional access you need the X# Runtime, the macrocompiler and the RDD:
XSharp.Core
XSharp.VO
XSharp.Macrocompiler
XSharp.RDD
XSharp.RT
If you like to use the DBServer class, you need also
XSharp.VORDDClasses
XSharp.VOSystemClasses.
Wolfgang
P.S. you can also use the VORDDClasses and the VOSystemClasses instead, but then you are limited to 32 Bit
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Juraj
Posts: 161
Joined: Mon Jan 09, 2017 7:00 am

WPF app and DBF file

Post by Juraj »

Hi Wolfgang,
Thank you for your response. When I use this code:
                dbUseArea(TRUE,"DBFCDX","OLDDBFFILE","OLD",FALSE)
                dbCopyStruct("NEWDBFFLE")
                dbCloseArea()
                dbCloseAll()
OLDDBFFILE is created in VO 2.6 app.
OLDDBFFILE I can open i MS Excel, NEWDBFFILE can not open in MS Excel or another DBF viewer. Error message : the file has a different formatJuraj
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

WPF app and DBF file

Post by Chris »

Hi Juraj,

Can you please send this dbf file?
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

WPF app and DBF file

Post by Chris »

Hi Wolfgang,
 P.S. you can also use the VORDDClasses and the VOSystemClasses instead, but then you are limited to 32 Bit
Those two libraries are AnyCPU in X#! :)
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Juraj
Posts: 161
Joined: Mon Jan 09, 2017 7:00 am

WPF app and DBF file

Post by Juraj »

HI Chris,

file in attachments

Juraj
Juraj
Posts: 161
Joined: Mon Jan 09, 2017 7:00 am

WPF app and DBF file

Post by Juraj »

Hi Chris,
in attachments
Juraj
Attachments
M022021.zip
(305 Bytes) Downloaded 24 times
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

WPF app and DBF file

Post by Chris »

Hi Juraj,

Thanks, I gave it a try and do not see an obvious problem, I can open the created new file with a dbeditor full without issues. Can you please send also a compilable sample that reproduces the problem?
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Juraj
Posts: 161
Joined: Mon Jan 09, 2017 7:00 am

WPF app and DBF file

Post by Juraj »

Hi Chris,
the user of the application opens this file in the MS excel program and continues to work with it. So I need that the file can also be opened in MS excel.
I will prepare the sample and send it.

Juraj
FFF
Posts: 1522
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

WPF app and DBF file

Post by FFF »

Jurai,
opened your file with Planmaker (an Excel-clone), with plain X# and with cmVoDBX without any problem.
LibreOffice 7.0 complains the file to be damaged.
Does it make any difference, if you add at least one record to the file?
Regards
Karl
(on Win8.1/64, Xide32 2.19, X#2.19.0.2.)
Post Reply