Hi,
I am using Navision 5.0 SP1 with SQL Server, I have another software which requires a specific table structure which is incompatible with Navision. I created a table in Navision and the required software in SQL server to. My problem now is how do I automatically insert the data into the second table when a record is added using Navision.
Below are the structure of the two different tables:
Navision created table in SQL server:
timestamp
id
length
picture
type
Software Created table in SQL Server:
id
length
picture
type
Any ideas how to achieve this or an alternative solution?
Thanks.
Few years ago we were not existing and few years to come we would be in the grave! So what will benefit us in the grave?
Comments
You need to give some detail of what you are doing, how many records, how often is the link accessed, which direction is the data, is ti modify read, or are inserts required etc etc.
1. When ever a record is entered using form in Navision the record should automatically be inserted/copied to the second table.
2. When ever a record is modified or deleted it should be applied on the second table as well.
3. All data entry and editing will be done using Navision only.
4. Also the length should be automatically generated, it is the length of the image (don't know how to achieve this as well.)
To be more explicit, there will be a form in Navision with the following fields: .
The timestamp field is Navision field. The length should be automatically obtain as the image/picture size/length.
Please let me know if you need any other info/clarification.
OK, so if the record will only be entered in NAV, then you don't need to do anying as such. Just create a SQL view for that other application to see the data in the format that you need. Or it mght be possible for the other application to read directly from NAV.
I don't think you need to replicate this as a second table, unless there is more information we need to know.
It doesn't work like that, I need the software to read the data from the SQL server and print the data using a special printer that only the software can handle. Also the software requires the Image table structure to be specific otherwise it doesn't even work.
Its such a pity we can't get Laurence Oliver* to ask the questions, I am sure then we would get all the answers.
Its just so much easier if you tell everythign up front, instead of leaking information slowly.
So why can't you use a view?
Thanks.
You could use a LinkedObject, you could use Triggers to populate another table, you could use ADO, you might use application server, you might use DTS, (integration services), you might use some T-SQL triggers,the list goes on. So we need as much information as possible, otherwise we spend lots of time discussing a solution, only to find that you forgot some important facts that make the solution unusable.
What you need is to explain what you need. Explain what this other software must find. Normally a program interfacing to SQL will only worry abotu the specific fields it needs, and will completely ignore any additional fields.
You need to explain why the TimeStamp is a problem.
How are you interfacing?
We have BadgeMaker software which is use for printing eCards and we can only use that software to print the cards. However we want all data entry to be handle by Nav and if possible print the cards from Nav by triggering the printer or such. The card design and layout can only be handle by BadgeMaker and printing the cards as well.
Also BadgeMaker will have to connect to the SQL Server and has to select an image table which has to follow the specified structure. When Navision creates table on SQL server DB it automatically adds the timestamp field and if it's removed the table doesn't work. All I want is to be able to handle the data in Nav and possible trigger the printer also to print the cards. Also the specific table needed by BadgeMaker to be automatically populated when data is inserted in the Nav version of the table.
This is exactly what I want.
You still havent explained how BadgeMaker interfaces to SQL. If it is ODBC it should just ignore the timestamp field. Have you tried it?
If it doesnt work then just create a view and have badge maker link to the view.
"Predefined structure" means that there must be this and this field, but do not say anything if it is table or view (view is like table, you do not notice the difference when accesing it though ODBC if you are just selecting data) or if there cannot be another fields.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
It means you need to create view defined like this:
You need to disable compression on the field in NAV (in field properties in NAV) to have correct size of the raw bitmap.
And if the view is working for you, you do not need to do more because the modifications in the base table will be automatically available in the view...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.