Import from .dbf file

1C:Enterprise platform integration capabilities and techniques

#1
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Sep 16, 2011
Company:

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

 
#2
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

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

 
#3
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Oct 25, 2012
Company: Care Small Animal Hospital

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

 
#4
People who like this:1Yes/0No
Active user
Rating: 7
Joined: Sep 26, 2012
Company: individual

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();

Edited: ivan avdonin - Jan 14, 2013 12:48 PM
 
#5
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Oct 25, 2012
Company: Care Small Animal Hospital

Thanks a lot, Ivan!

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.