if you need to write datas from your asp.net site into a sql database use the .net functionality. If the NAV database is on the sql server you can handle the database like some other sql database.
If you then want to run some NAV code (C/AL like in codeunits, triggers or so) you must run a Client or better a NAS that process your datas which are written from asp.net application into the database.
But doen't forgett: If you write datas into a navision table (like Sales Header) the Navision C/AL code (business logic) will not run, because only a Nav / NAS Client can run this code.
So, better is to use a Pre-Preocess table. Store there all infos and the NAS process this datas.
I would always be very careful about writing to SQL tables that are Navision controlled. Navision is picky about it's data types and underlying structures and if any external application writes invalid data to a Navision table this can corrupt your system.
My general recommendation to clients and other developers when trying to access Navision via SQL through other non Navision client methods is: 1) for read access to data simply read from the tables via SQL directly 2) for write access make sure to use a staging table, MSMQ, C/ODBC or other Navision supported and controlled integration method. This will then ensure that any business logic and data validation is fully controlled by Navision.
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Epimatic Corp.
http://www.epimatic.com
If you then want to run some NAV code (C/AL like in codeunits, triggers or so) you must run a Client or better a NAS that process your datas which are written from asp.net application into the database.
But doen't forgett: If you write datas into a navision table (like Sales Header) the Navision C/AL code (business logic) will not run, because only a Nav / NAS Client can run this code.
So, better is to use a Pre-Preocess table. Store there all infos and the NAS process this datas.
Is it that what you need?
My general recommendation to clients and other developers when trying to access Navision via SQL through other non Navision client methods is: 1) for read access to data simply read from the tables via SQL directly 2) for write access make sure to use a staging table, MSMQ, C/ODBC or other Navision supported and controlled integration method. This will then ensure that any business logic and data validation is fully controlled by Navision.
Epimatic Corp.
http://www.epimatic.com
RIS Plus, LLC
viewtopic.php?f=23&t=31374
viewtopic.php?f=23&t=31713
Epimatic Corp.
http://www.epimatic.com