Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

[SOLVED] Customer C...
 
Notifications
Clear all

[SOLVED] Customer CSV import error

8 Posts
2 Users
0 Reactions
9,541 Views
(@stewski)
Posts: 8
Active Member
Topic starter
 
[#2772]

Hi
This may just be me being blind but I can't see whats wrong with my CSV import file.
I get this error
SQLSTATE[HY000]: General error: 1364 Field 'name' doesn't have a default value

Here is the first 2 lines of the CSV.
id,customer name,type of customer,customer code,payment deadline,tax,tax number,closed,description,designation,street,complement,zip code,city,state,country
1,EDS,98,EDS,,,,,,Our address,Our Road,Our town,,Our city,Our State,UK

anyone with any ideas, most appreciated...


 
Posted : 01 Dec 2015 17H08
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

Most possibly you tried to import with current language different from the one you used to export.
So, using "translated names" instead of codes for columns fails.
You should provide codes instead of captions, "name" instead of "customer name"
When importing, click on small help icon beside element select list to have description of expected fields.


 
Posted : 01 Dec 2015 17H38
(@stewski)
Posts: 8
Active Member
Topic starter
 

Thanks for the support babynus, I have already tried with codes and/or captions getting the same result each time.
I tried again with codes, just in case but no luck, It looks like a simple CSV I must be missing something...

I still get the error "SQLSTATE[HY000]: General error: 1364 Field 'name' doesn't have a default value" but it looks like there is a value in the file, very odd...


 
Posted : 01 Dec 2015 18H09
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

What is strange is that it is a MySql error, but you should have a ProjeQtOr error before because name is mandatory.

Check your file in text mode : maybe you have extra empty lines. Just remove them.


 
Posted : 01 Dec 2015 19H10
(@stewski)
Posts: 8
Active Member
Topic starter
 

Hi Babynus
I've tried creating dos/mac csv, I've created a 2 line file by hand in notepad++, I cant think that it is actually the CSV that is causing the problem.
This is what I used:

id,name,idClientType,clientCode,idPaymentDelay,taxPct,numTax,idle,description,designation,street,complement,zip,city,state,country
1,EDS,98,EDS001,,,,,,Waterside BP,16XX Perhshore,Kings Norton,,Birmingham,WM,UK

Still comes back with:
SQLSTATE[HY000]: General error: 1364 Field 'name' doesn't have a default value

Could it be a bug/regression in version 5.1.4?


 
Posted : 01 Dec 2015 19H22
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

Could it be a bug/regression in version 5.1.4?

I really don't think because it works fine on my side.

1) check separator character as defined in Global parameters screen. I think default is ; and you try to use , so issue may come from this.
2) try and export a list of existing items : you'll get correct format as exported files can be imported.


 
Posted : 01 Dec 2015 19H28
(@stewski)
Posts: 8
Active Member
Topic starter
 

My Apologies,
No bug actually its a feature.
I see now you are not using commas as delimiters in your CSV, you are using semi colon, I didn't have any customers to export to see this earlier.

quick file edit and 13000 records uploaded without problem, thank you babynus.
Now to start using this system in anger...


 
Posted : 01 Dec 2015 19H39
(@stewski)
Posts: 8
Active Member
Topic starter
 

I must say thanks for your help again Babynus, this project and your support are awesome...


 
Posted : 01 Dec 2015 20H00
Share:

Scroll to Top