Board index » jbuilder » Correction: ProcedureDataset.SaveChanges with JOIN

Correction: ProcedureDataset.SaveChanges with JOIN


2004-07-31 03:14:17 AM
jbuilder16
Hello,
JBuilder X Enterprise
SQL Server 2000
Is it possible to SaveChanges() to 2 different tables in a
procedure with a join? I have a proc that joins 2 tables,
SQL is:
SELECT
A.AKey, A.F1, B.BKey, B.F2
FROM TableA AS A
INNER JOIN TableB as B ON A.AKey = B.BForeignKey
In Java, I have:
procedureDataset1.column1.setServerColumnName("AKey");
procedureDataset1.column1.setRowId(True);
procedureDataset1.column1.setTableName("A");
procedureDataset1.column2.setServerColumnName("F1"); // was "F2" in prior post
procedureDataset1.column2.setTableName("A");
procedureDataset1.column3.setServerColumnName("BKey");
procedureDataset1.column3.setRowId(True);
procedureDataset1.column3.setTableName("B");
procedureDataset1.column3.setServerColumnName("F2");
procedureDataset1.column3.setTableName("B");
When procedureDataset1.setTableName(""); I get error
[ML-QA01]Cannot use empty object or column names. Use a single pace if necessary.
When procedureDataset1.setTableName("A"); I get error:
The row specified by the resolution query was not found. (etc...)
I thought setting a tableName for each column would override
the ProcedureDataset.tableName and allow a save. Is there a
solution? Note that I have successfully saved using a single
table proc (no join).
Thanks,
Brian Lowe
Monitor Liability Managers, Inc.
 
 

Re:Correction: ProcedureDataset.SaveChanges with JOIN

In <410a9e09$ XXXX@XXXXX.COM >Brian Lowe wrote:
Quote

Hello,

JBuilder X Enterprise
SQL Server 2000

Is it possible to SaveChanges() to 2 different tables in a
procedure with a join? I have a proc that joins 2 tables,
SQL is:
Generally joined tables require a custom resolver.. Or in your case,
since you are using the ProcedureDataSet, special insert, delete, and
update procedures that handle both tables. (ProcedureDataSet allows for
a unique procedure for each..)
John..
--
=============================================
TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
Post all questions and replies to this newsgroup ONLY
For papers on DataExpress, Applets, JSP, and Web Development go to:
www.microps.com/mps/paperFAQ.html
====================================================
 

Re:Correction: ProcedureDataset.SaveChanges with JOIN

In <410a9e09$ XXXX@XXXXX.COM >Brian Lowe wrote:
Quote

Hello,

JBuilder X Enterprise
SQL Server 2000

Is it possible to SaveChanges() to 2 different tables in a
procedure with a join? I have a proc that joins 2 tables,
SQL is:
Been a while since I've done this so pardon the cobbwebs...<G>
Anyway as I remember it, you need to specify individual procedures for
Insert, Delete, and Update. I would try a test using the UI designer
and create your ProcedureDataSet there.. You can then look at the code
it generates and this will help you understand the process..
There is a very basic discussion of this in the following paper..
www.microps.com/mps/p_resolvers.html
..it should provide the basics for you to work with...
John..
--
=============================================
TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
Post all questions and replies to this newsgroup ONLY
For papers on DataExpress, Applets, JSP, and Web Development go to:
www.microps.com/mps/paperFAQ.html
====================================================
 

{smallsort}