Link table

 5 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Srini Rao
Veteran Member Send Private Message
Posts: 149
Veteran Member
I have SQL Server 2008 with database A on machine A. Another  SQL Server 2008 with Lawson S3 database on B. I want to link tables from the database on machine A into a database on machine B and Update the table A using 4GL program. Any help is Appreciated.
Judy Consoli
Veteran Member Send Private Message
Posts: 43
Veteran Member
From our DBA:

They can do this.  The linked table needs to be defined in Lawson dbdef so that you can see it with a custom Lawson program.  You would define the link the same way that you define a view.

Send me your email if you want to discuss offline. Judy Consoli
Judy Consoli
Veteran Member Send Private Message
Posts: 43
Veteran Member
See Knowledge Base Article

KB 1208563

for information on building a view
Srini Rao
Veteran Member Send Private Message
Posts: 149
Veteran Member
Thanks Judy.
Ari
Veteran Member Send Private Message
Posts: 49
Veteran Member
The thing to remember is there is no such thing as Linked Tables in SQL Server. There are Linked Servers, that allow you to Link Servers together to do the same thing as Fully Qualified Names. Once you link the servers you can create a View that references the Base Table(s) in the Foreign Database. You would then define the View up in Lawson's dbdef as described in the above KB article. The Lawson custom program can then  Add, Delete and Modify columns in one of the Foreign Base Tables referenced in the View. This can be done because SQL Server allows updating columns in only one base table that is in a View. If your View only references one table then this would not be a problem. Also, remember to define your column datatypes in your foreign Table(s) as types that are supported by dbdef. Either that or you will need to do cast or converts in your view.
Srini Rao
Veteran Member Send Private Message
Posts: 149
Veteran Member
Ari, Thanks for the information. I was able to create view and access the data using rngdbdump