[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Rimantas Usevicius

11/17/2005 7:07:00 AM

Hi ! I did own data export application ( with VB ) , which can export
needful data to Axapta's Oracle DB through OLE Db . In earlier I was
thinking that RecId it's generated by Oracle , but it seems that value for
this field it's generated by Axapta , or not ? So my problem for new
exported records it's RecId value . How can I get this ?

With best regards ! Rimantas .

8 Answers

Khue Trinh

11/17/2005 8:40:00 AM

0

Yes, the recid is generated by Axapta. In your case, during your data import,
please use the method insert() of Axapta to generate the recId.

P/s: for some tables using the RefRecId column to keep the relation (like
Document Handling), the recId is a big problem during import and export data.
Khue Trinh
--
ERP Dev.


"Rimantas Usevicius" wrote:

> Hi ! I did own data export application ( with VB ) , which can export
> needful data to Axapta's Oracle DB through OLE Db . In earlier I was
> thinking that RecId it's generated by Oracle , but it seems that value for
> this field it's generated by Axapta , or not ? So my problem for new
> exported records it's RecId value . How can I get this ?
>
> With best regards ! Rimantas .
>
>

Rimantas Usevicius

11/17/2005 9:11:00 AM

0

> Yes, the recid is generated by Axapta. In your case, during your data
> import,
> please use the method insert() of Axapta to generate the recId.
>
> P/s: for some tables using the RefRecId column to keep the relation (like
> Document Handling), the recId is a big problem during import and export
> data.
> Khue Trinh

Hello Khue ! I wrote that I will export data , not import , with external
program , so I can't to use Axapta's insert() :-) . But I'm new with Axapta
and maybe here it's COM or DLL with which I can to do Axapta's insert() from
external program . Do you know that ? I'll be thankfull for any information
.. I found some information , that the recid is stored SystemSequence table .
It seems that this can be done . It's only one thing that with this value
it's necessary to be carreful , because as I read this value is in cache in
Axapta and I don't want to break it for another user . I'm a little afraid
about that after such information .

Regards ! Rimantas .

>> Hi ! I did own data export application ( with VB ) , which can export
>> needful data to Axapta's Oracle DB through OLE Db . In earlier I was
>> thinking that RecId it's generated by Oracle , but it seems that value
>> for
>> this field it's generated by Axapta , or not ? So my problem for new
>> exported records it's RecId value . How can I get this ?

Mike Frank

11/17/2005 12:08:00 PM

0

If possible you should try to use COM to insert your records. Another possible solution would be to
use a temporary table which you scan from inside Axapta and copy records into your Axapta table.

There have been discussions here about drawing RecId's from SystemSequences from outside Axpta, but
you should try to avoid that.

Mike

Rimantas Usevicius

11/17/2005 1:11:00 PM

0

> If possible you should try to use COM to insert your records. Another
> possible solution would be to use a temporary table which you scan from
> inside Axapta and copy records into your Axapta table.
>
> There have been discussions here about drawing RecId's from
> SystemSequences from outside Axpta, but you should try to avoid that.

Hello Mike ! It'll be very nice if you make some light in this path...
:-)) Can you direct me , where i can find information , how to use Axapta's
COM with Visual Basic ? Though "Google my friend .. " , but some words about
that will be very usefuls .

With best regards ! Rimantas .

Khue Trinh

11/17/2005 3:34:00 PM

0

hi again,
-For COM connector using, you can find a document which can guide you to
integrate Axapta by VB.NET and Web service. Just go to MSDN and search for
Axapta. If you can not find it, just give me your email, i can send it to you.

-For your export, if you don't have the column some where called RefRecId
(as I mentioned last post). then just don't care about recId. Because, as I
know (maybe i am wrong), RecId is generated from kernel of Axapta and we can
not touch it.

regards,
Khue Trinh
--
ERP Dev.


"Rimantas Usevicius" wrote:

> > If possible you should try to use COM to insert your records. Another
> > possible solution would be to use a temporary table which you scan from
> > inside Axapta and copy records into your Axapta table.
> >
> > There have been discussions here about drawing RecId's from
> > SystemSequences from outside Axpta, but you should try to avoid that.
>
> Hello Mike ! It'll be very nice if you make some light in this path...
> :-)) Can you direct me , where i can find information , how to use Axapta's
> COM with Visual Basic ? Though "Google my friend .. " , but some words about
> that will be very usefuls .
>
> With best regards ! Rimantas .
>
>

Mike Frank

11/18/2005 8:16:00 AM

0

There is a better article now, then the one about WebService integration described by Khue Trinh

Go to MSDN library (http://msdn.microsoft.com/library/d...)
Under "Server and Enterprise Development" ==> Microsoft Business Solutions ==> Axapta ==> Technical
Articles have look at the article "Integrating Microsoft Axapta Using the Axapta Business Connector
and Visual Basic .NET". It's newer and goes much deeper than the WebService article. Bill Thompson
did a nice job here.

Some remarks:
You won't find an actual insert from COM Connector code in the example. All those calls are wrapped
in Axapta code, which is a sensible thing to do, because X++ code is much more easily written with
the help of the Axapta IDE and internal helper functions (tablenum etc.), access to enums ...
Business logic should in any case always stay inside Axapta.

If your case is simpler you can of course insert the records directly using the Business Connector
IAxaptaRecord.insert() interface method. An example how to use this interface you can find in the
code to fetch records from Axapta (Private Sub loadInfo) (Though I would prefer to do even this
through a wrapper).

If you are using VB6 instead of VB.NET you should be able to port the code very easily.

Mike

Rimantas Usevicius

11/21/2005 12:42:00 PM

0

> There is a better article now, then the one about WebService integration
> described by Khue Trinh
>
> Go to MSDN library (http://msdn.microsoft.com/library/d...)
> Under "Server and Enterprise Development" ==> Microsoft Business Solutions
> ==> Axapta ==> Technical Articles have look at the article "Integrating
> Microsoft Axapta Using the Axapta Business Connector and Visual Basic
> .NET". It's newer and goes much deeper than the WebService article. Bill
> Thompson did a nice job here.
>
> Some remarks:
> You won't find an actual insert from COM Connector code in the example.
> All those calls are wrapped in Axapta code, which is a sensible thing to
> do, because X++ code is much more easily written with the help of the
> Axapta IDE and internal helper functions (tablenum etc.), access to enums
> ...
> Business logic should in any case always stay inside Axapta.
>
> If your case is simpler you can of course insert the records directly
> using the Business Connector
> IAxaptaRecord.insert() interface method. An example how to use this
> interface you can find in the code to fetch records from Axapta (Private
> Sub loadInfo) (Though I would prefer to do even this through a wrapper).
>
> If you are using VB6 instead of VB.NET you should be able to port the code
> very easily.

Thanks you for direction . At this time I did own export to Axapta's Db
( Oracle ) throgh OLE DB and queries , it works OK . I reviewed information
about "systemsequences" table , from where global recid is generated , and
found that here there'snt any risk to use this table and replace new values
for recid in "nextval" . It works fine . The biggest problem was to find
others compatibillities - I have never thinked , that ussual character field
is belong from adjustment . In "salestable" salesId value is from right to
left - and that it's important in others tables - why so that done ? It
seems something jewelly ... :-))) Only after some tracking I found that
salesline can't find record in salestable , because in both tables salesid
is in "natural" sequence - from left to right . But if values in both tables
are identicals , why direct attentation , in which adjustment they are ?
That's is only my stupids question of Axapta's novice ... :-))) But at
least all is working OK .

With best regards ! Rimantas .

Mike Frank

11/22/2005 9:57:00 AM

0

> that ussual character field is belong from adjustment . In "salestable"
> salesId value is from right to left - and that it's important in others
> tables

Those are the things you don't have to worry about if programming inside Axapta ;-)

Right adjustment is for sorting (so 1,2, ... 10, 11) sorts correctly.

Mike