Source language: Translate to:

dbpImportFromCSV

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

dbpImportFromCSV

Postby smartmedia » Tue Aug 07, 2007 4:17 am

Hi...

I use dbpImportFromCSV to import some data from an CSV file to access database.
That file has been exported from excel with Delimiter = ;
Now when i put ; in Delimiter option automaticaly DBP put doubles quotes. Why..???

Second problem...
Let's say that the field size is 10 characters.
If the imported text is less than 10 characters DBP fill the rest until 10 with spaces.

Is this a bug...???
I dind't try the other import export methods to see how the working.
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Neosoft Support » Tue Aug 07, 2007 10:11 am

I use dbpImportFromCSV to import some data from an CSV file to access database.
That file has been exported from excel with Delimiter = ;
Now when i put ; in Delimiter option automatically DBP put doubles quotes. Why..???


NeoBookDBPro and SQL use the ; character as a delimiter too as you can see in the dbpImportFromCSV action's options parameter. The quotes surrounding the ; character are necessary to prevent DBPro from misinterpreting the ; character.

Second problem...
Let's say that the field size is 10 characters.
If the imported text is less than 10 characters DBP fill the rest until 10 with spaces.


It sounds like you're using a Char type field. Char fields are always fixed width, so the database engine will pad the data with spaces up to the defined size of the field. The database engine does this, not DBPro*. Try using String or VarChar fields instead, which are variable width.

*The spaces are actually stored in the database, however, in a future version we may be able to have DBPro trim off the extra spaces as the data is read.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby smartmedia » Sun Aug 10, 2008 9:24 am

Hi...

In my database there is a table called categories and keeps and data from category of products.
dbpExportFromCSV is working 100%
When i run dbpImportFromCSV i get the same error "Bookmark is invalid"
The id field is AutoInc but is hided in grid and the option in export to "include hidden field is OFF"
I create an example to play with and reproduce the error.

You can doanload it from here.
http://rapidshare.com/files/136321161/ExportCSV.rar.html
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Neosoft Support » Mon Aug 11, 2008 10:42 am

Thank you very much for the sample publication. I will add this to the list of things to correct in the next DBPro update.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 2 guests