VB.net Addins for Ms Project 32 bits Corrupt data when paste from - Microsoft Community
- Get link
- X
- Other Apps
hi,
i have vb.net 2010 addins application ms project 2010.
the objective of addins connect sap pm sap.net connector 3.0 bring work orders (and operations) , paste ms project task table.
development machine:
- windows 7 pro, spanish language, 64 bits
- vs.net 2010 pro, english language
- ms project 2010, english language, 64 bits
target machine:
- windows 7 pro, spanish language, 64 bits
- ms project 2010, spanish language, 32 bits
i generate 2 installer: 1 64 bits, , other 32 bits. both version have same lines of code.
running addins in 64 bits version of ms project 2010 works fine, in 32 bits version, corrupt data when paste large values number custom fields (ex.: 94137750 corrupted 94137752, 94048923 corrupted 94048920, etc.). failure doesn't occurs when paste small values "10" or "44502".
the steps put records clipboard , paste values ms project task table following:
- step 1: add records string variable. "vbtab" delimiter between fields , "vbnewline" delimiter between records.
- step 2: put de string variable clipboard , paste ms project task table.
lines of code:
step 1:
mystring = mystring & tabla.getstring("pltxt").tostring.replace(chr(34), "´´") & vbtab & "op" & vbtab & tabla.getstring("eqktx").tostring.replace(chr(34), "´´") & vbtab & tabla.getstring("ltxa1").tostring.replace(chr(34), "´´") _
& vbtab & tabla.getstring("arbpl").tostring.replace(chr(34), "´´") & vbtab & tabla.getstring("steus").tostring.replace(chr(34), "´´") & vbtab & vbtab & tabla.getstring("eqfnr").tostring.replace(chr(34), "´´") & vbtab & tabla.getstring("eqfnr1").tostring.replace(chr(34), "´´") & vbtab & tabla.getstring("equipo").tostring.replace(chr(34), "´´") _
& vbtab & tabla.getstring("revision").tostring.replace(chr(34), "´´") & vbtab & tabla.getstring("nomarea").tostring.replace(chr(34), "´´") & vbtab & tabla.getstring("tplnr").tostring.replace(chr(34), "´´") & vbtab & tabla.getstring("prioridad").tostring.replace(chr(34), "´´") & vbtab & tabla.getstring("claseo").tostring.replace(chr(34), "´´") & vbtab & tabla.getstring("centroe").replace(chr(34), "´´") _
& vbtab & tabla.getstring("nomemplaza").tostring.replace(chr(34), "´´") & vbtab & tabla.getstring("local").tostring.replace(chr(34), "´´") & vbtab & tabla.getstring("area").tostring.replace(chr(34), "´´") _
& vbtab & tabla.getstring("responsable").tostring.replace(chr(34), "´´") & vbtab & tabla.getstring("grupop").tostring.replace(chr(34), "´´") & vbtab & tabla.getstring("centrop").tostring.replace(chr(34), "´´") _
& vbtab & tabla.getstring("proveedor").tostring.replace(chr(34), "´´") _
& vbtab & tabla.getstring("claseaop").tostring.replace(chr(34), "´´") & vbtab & vbtab & tabla.getstring("destinatario").tostring.replace(chr(34), "´´") & vbtab & tabla.getstring("puestodescarga") & vbtab & vbtab & tabla.getstring("nomfantasiaprov").tostring.replace(chr(34), "´´") & vbtab & vbtab & scontrato & vbtab & dtrabajor1 _
& vbtab & tabla.getstring("aufnr") & vbtab & tabla.getstring("vornr") & vbtab & tabla.getstring("maufnr") & vbtab & srecurso & vbtab & sfiniaux & vbtab & sfiniraux & vbtab & sfinraux & vbtab & sduracion & vbtab & strabajor & vbtab & vbnewline
step 2:
my.computer.clipboard.clear()
my.computer.clipboard.settext(mystring)
globals.thisaddin.application.editpaste()
my.computer.clipboard.clear()
table.getstring("aufnr") contains value sap paste ms project number custom field, 1 corrupted.
when run application in debugging mode, can check that table.getstring("aufnr") has right value, however, changes value when paste ms project table. tried write value directly number custom field
and works fine.
i had test replacing table.getstring("aufnr") constant (example: "94137750") , pasted successfully.
the size of table.getstring("aufnr") char(12) redundant zeros "000094137750". tried removing zeros before passing value string variable, however, have same result.
thanks in advance,
manuel.
hi manuel,
to better support visual basic , programming concerns, recommend post inquiry microsoft developer network forum advanced troubleshooting.
regards.
Office / Project / Other/unknown / Office 2010
- Get link
- X
- Other Apps
Comments
Post a Comment