Last post Jul 06, 2012 06:52 PM by andreidragosr
Jul 06, 2012 04:26 AM|andreidragosr|LINK
I have a list of objects stored in a session (Session("CC")), I work in VB code, and I need to insert that code into a table.
And I have another Session("UtilizatorLogat") in witch I have stored The user's data in an object, that has: "Tip" (type), "ID", "User".
I need to add firsly in the Facturi_vanzare the Tip Client and depending on the type (if it's "PF" add the ID into CNP / if it's "PJ" add into the CUI), the Primary key is autonumber And the curent date into "DataFacturaVanzare". And after that, retrive
the Primary Key, And... insert into the second table that has that primary key as foreign key, all the objects/"Produs" stored in the firs session
Here is a picture of the 2 tables so you can understand better what I am saying:
So, tu recap:
1) I need to add into the table "Facturi_Vanzare" from the object stored in the session "UtilizatorLogat"
2) Retrive the PrimaryKey "NrFacturaVanzare"
3) Insert Into "ProduseFacturateVandute"
So everything in VB code... and not with ADO.NET because I understood ADO.NET doesen't work with x64 systems...
From what I searched... you must connect with an ole db or something...
Please help me, it's for my graduation project... It gets complicated by the minute, I hope this is the last problem I have to face...
Jul 06, 2012 10:43 AM|andreidragosr|LINK
Jul 06, 2012 05:15 PM|andreidragosr|LINK
Jul 06, 2012 06:27 PM|hans_v|LINK
I'm not sure what exactly your question is, but read these links:
Jul 06, 2012 06:52 PM|andreidragosr|LINK
My question was how can I add thoes lines, retrive the last added from another table and insert from vb code, depending on the type of one row...
I belive thoes links can help me, I'll test them tomorrow, because now it's 2am (02:00) here and I kinda stopped thinking half an hour ago:D (if the links are good I'll mark as solved the topic)
Thank you for responding!
I found the answer, nevermind :)