display records from external datbase

hi,

i have create one form named detailsform. In this detailsform consists of one datasource name custtable and as well i have another external database containing salestable. so i want to display some fields from custtable and some fields from salestable(external database) in detailsform. it is possible or not?

Could you please any one give the solution for above question.

Thanks,

moulali.

Hi,

Yeah it is possible …In SalesTable you find CustAccount by that u can match with custTables Account number and try to get your required data ,but u can find multiple records from salesTable for the same customer …so be clear with functional requirment .

Ex : while select SalesTable where SalesTable .CustAccount == Custable(Ur datasource name).AccountNum

hi jyothi,

no functional requirement is here. just i have a doubt. i created one form with custtable datasource. custtable contains custname,custacc, custbranch,custcity fields. and same way i have external database it is out of AX. In external database have a salestable with 4 fields. so i want to display two fields from custtable and two fieds from sales within i created form. here my doubt is how connect external database and how fetch those two fields within i created form.

finally i created form should display total fourfields data —> two fieds from custtable and two fields from salestale.

hi,

please any one give the answer the above. please please…

Thanks,

Hi,

please any one give answer for above question. how it is possible. please…

Thanks,

moulali.

please anyone help on above issue. please…

Thanks,

moulali

So your external database is outside the AX database? You’ll need ODBC to run SQL query.

Hi

could please anyone suggest the answer for above question. Please…

Thanks

Hi,

To get an idea how to connect to External database, please have a look here http://dynamicsuser.net/forums/p/45539/230363.aspx#230363 and here http://dynamicsuser.net/forums/p/46281/233982.aspx#233982. Also if you search, you will find more info on how to connect to external database.

Hi,

I don’t know your requirement 100%. But just a suggestion -

If this form will be used regularly, then reading external data every time may not be efficient to do. In such cases, create a batch job which will read values from external database and store them in AX itself.

hi,

U can use ‘CCADOCommand’ to connect external database

Hi Harish,

Thanks for sharing above link and it is very useful for above question.

Thanks,

moulali.