4D v14

ビデオの内容

ホーム

 
4D v14
ビデオの内容

ビデオの内容  


 

 

In this video, we'll learn how to create a table directly when importing data.

We have already imported data into the Interventions and Technicians table.

To save time and quickly retrieve existing information already entered in another database or in a spreadsheet, we are going to see how to create a table directly when importing data from a tab-delimited text file.

We'll perform an import like we did in previous videos.

  • "File" => "Import" => "From File..."
  • This display a list of all the files
  • And we can select "places.txt"

The import settings dialog box appears:

  • Click on "Create Table"
  • Then enter a name for the table
  • Then, in the 2nd tab named "Header", check the "Column Titles as Field Name" box

Fields are then created automatically and typed by default according to their contents.

Back on the 1st tab, we can still run into problems with accents so let's change the file and then we can indicate which type of field we want to set for each column.

  • Here, Alpha is fine
  • Alpha
  • Alpha
  • For the zip code, we recommend using Alpha
  • And for the City as well.

Once these settings are made, click on the "Import" button.

The data is imported and then 4D offers to create forms for this new table.

As we have done so far, we click on Yes.

There are other ways of importing available in 4D:

  • Import by forms
  • ODBC import
  • Importing data from former databases, through conversion
  • Connection to other databases
  • Programmed import

Using this same Import dialog box, File => Import => From File, you can import data using a form. We are going to simulate this without actually going through with it.

For example, in the places.txt file, we can import data using a form.

The idea is to create a specific form, dedicated to importing data where we have programmed object methods or the form method itself so that they perform automatic checking, reformatting or automatic filling in of calculated fields, etc. just as if the user was entering data directly in this form.

Later on in the programming, we can carry out imports using the Open document and RECEIVE PACKET commands, which we will see in another video.

 
プロパティ 

プロダクト: 4D
テーマ: データ読み込み

 
ARTICLE USAGE

セルフトレーニング ( 4D v13)
セルフトレーニング ( 4D v14)