Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Integration > Import from .dbf file

Forum

Search UsersRules
Import from .dbf file
#1
Active user
Points:: 2
Joined:: Sep 16, 2011

Did someone try to import .dbf files? Please share some experience.

Profile
#2
Guest
Points::
Joined::

You can use XBase for reading and writing .dbf files. See XBase object description in Syntax Assistant for more details.

Profile
#3
Active user
Points:: 0
Joined:: Oct 25, 2012

I need to import a DBF file, could anyone share a code sample for that?

Profile
#4
Active user
Points:: 0
Joined:: Sep 26, 2012

Code
BaseDBF = New XBase;
BaseDBF.OpenFile("c:\test.dbf",,true);
BaseDBF.First();

While Not BaseDBF.EOF() Do
   Code = TrimAll(BaseDBF.KOD);
   Name = TrimAll(BaseDBF.NOM);

   Message(Code + " | " + Name);

   BaseDBF.Next();
EndDo;

BaseDBF.CloseFile();

Profile
#5
Active user
Points:: 0
Joined:: Oct 25, 2012

Thanks a lot, Ivan!

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.