1. Christian Breu
  2. as Valentina DB Server
  3. Donnerstag, Juni 20 2019, 07:27 AM
  4.  Abonnieren via E-Mail
Looks like a bug...
Importing a file with only header but no record, VCursor.importText is creating a record.
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
It seems you do the import with "inHasColumnHeader as Boolean = false" param. So every row is treated as data.
Kommentar
There are no comments made yet.
Christian Breu Akzeptierte Antwort
You are funny Ivan... :p

I use true for that parameter, do not worry! If not, I would not post and ask such question here.
If you think it works correct, let it be – I already built my own proofing workaround.
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
I'm afraid you get me wrong. I mean - current + new one tests work fine - no problems. But "false" as param causes to exactly your result.
Ok, could you send me that file for testing + all the params you are calling with VCursor.importText?
Kommentar
There are no comments made yet.
Christian Breu Akzeptierte Antwort
Do not worry Ivan, everything is ok.
I also wondered but most of the files I get have a newline and a blank line after the header line.
Attached the file I tested with and here the XOJO code:


Dim impCSVCurs As New VDBCursor(vDBDatabase, "SELECT "_
+ "import_TEMP.portalID AS portal_id, "_
+ "import_TEMP.portalGroupID AS portal_orderGroupId, "_
+ "import_TEMP.productArtikelnummer AS portal_sapNumber, "_
+ "import_TEMP.productBarcode AS portal_ean, "_
+ "import_TEMP.foto360 AS portal_360g, "_
+ "import_TEMP.spaceMan AS portal_apollo, "_
+ "import_TEMP.spaceManPacked AS portal_withPackaging, "_
+ "import_TEMP.spaceManUnPacked AS portal_noPackaging, "_
+ "import_TEMP.productTRAY AS portal_tray, "_
+ "import_TEMP.productKW AS portal_kw, "_
+ "import_TEMP.orderExpress AS portal_express, "_
+ "import_TEMP.sampleDelivery AS portal_sampleDelivery, "_
+ "import_TEMP.sampleBack AS portal_sampleReturn, "_
+ "import_TEMP.removeFlag AS portal_storno, "_
+ "import_TEMP.portalMail1 AS portal_eMail1, "_
+ "import_TEMP.portalMail2 AS portal_eMail2, "_
+ "import_TEMP.portalInstruction AS portal_photoInstruction "_
+ "FROM import_TEMP;", 2, 3, 1)

impCSVCurs.ImportText(classicFileObject, Chr(59), Chr(10), "UTF-8", True, 0)
impCSVCurs = Nil



Thank you.
Anhänge
Kommentar
There are no comments made yet.
  • Seite :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories