Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

hk_importcsv Class Reference

imports comma delimited textfiles More...

#include <hk_importcsv.h>

Inheritance diagram for hk_importcsv:

Inheritance graph
[legend]
Collaboration diagram for hk_importcsv:

Collaboration graph
[legend]
List of all members.

Public Member Functions

bool execute (enum_interaction i=interactive)
void set_filedefinition (const hk_string &textdelimiter="\"", const hk_string &betweenfields=",", const hk_string &rowdelimiter="\n")
void set_filename (const hk_string &filename)
void set_firstrow_contains_fieldnames (bool f=true)
void set_append_rows (bool f=false)
void set_create_new_table (bool n=true)
void add_columnname (const hk_string &col)
void clear_columnlist (void)
hk_string textdelimiter (void)
hk_string betweenfield (void)
hk_string rowdelimiter (void)
void set_overwrite_table (bool)
bool overwrite_table (void)

Protected Member Functions

void set_columns (void)
void create_automatic_columns (void)
bool initialize_table (enum_interaction)
virtual bool before_columns_deleted (void)
virtual bool widget_specific_after_new_row (void)

Detailed Description

imports comma delimited textfiles

Version:
Revision
1.19
Author:
Horst Knorr (hk_classes@knoda.org)


Member Function Documentation

void hk_importcsv::add_columnname const hk_string &  col  ) 
 

Define the equivalent column names in an existing table. Column 1 of the CSV File will be added to the first column of the table.

bool hk_importcsv::before_columns_deleted void   )  [protected, virtual]
 

FOR WIDGET DEVELOPERS ONLY: will be automatically called before the columns will be deleted. usually column pointers will be set to NULL in this function. i.e.when enabling,disabling or when a depending datasource has to requery its rows.

Reimplemented from hk_dsvisible.

bool hk_importcsv::execute enum_interaction  i = interactive  ) 
 

after setting all infos start the import with execut

Returns:
true if successful else false

void hk_importcsv::set_append_rows bool  f = false  ) 
 

If user wants to append data, instead of creating a new table or overwriting an existing table. Default is false.

void hk_importcsv::set_create_new_table bool  n = true  ) 
 

If set to true a new table will be created else it will be appended to an existing table

void hk_importcsv::set_filedefinition const hk_string &  textdelimiter = "\"",
const hk_string &  betweenfields = ",",
const hk_string &  rowdelimiter = "\n"
 

defines the fielddelimiter and the columndelimiter of the csv-file.

void hk_importcsv::set_filename const hk_string &  filename  ) 
 

Name of the CSV-file

void hk_importcsv::set_firstrow_contains_fieldnames bool  f = true  ) 
 

If the first row in the CSV file contains set this function to true else false Default is true

bool hk_importcsv::widget_specific_after_new_row void   )  [protected, virtual]
 

If this function returns false the execution of the import will be cancelled


The documentation for this class was generated from the following files:
Generated on Tue Mar 22 19:28:19 2005 for Databaseconnectionclasses by  doxygen 1.4.1