Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Multi-table update using ADO

Posted on 2008-10-09
3
Medium Priority
?
358 Views
Last Modified: 2013-11-23
I'm converting an old application to ADO from BDE and need some help.

A BDEClientdataset has been used to call a stored procedure (via commandtext) to return multi-table data to the screen. The data on-screen is edited in a DB-Aware manner and then, in the OnBeforeUpdateRecord , the data is stored away via another stored procedure and the dataset marked as applied. This all worked fine, but now I need it as ADO.

Just as a test, I added a TADOStoredProc, setting this to the procedure that returns the data and connected it all up. This works fine, returning the data to the screen. I had coded nothing else, but it allowed me to edit some of the fields in the dataset and then post them and it updates the DB.

I didn't expect to be able to edit the dataset let alone it actually updating the DB.

However I need to be able to update all fields as post them to the DB via one means or another. If anyone can help with this that would be great.

N.B. working with SQL Server 2000 & Delphi 6   :-E
0
Comment
Question by:Bongos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 22677301
the last thing for the fields to be editable must be a simple select fields

if you do calculating on a field, like
SELECT ISNULL(Test, 0) TEST ...
will make this field readonly

SELECT A.TEST FROM
(SELECT ISNULL(Test, 0) TEST ...) AS A

should solve this problem

otherwise a little more specifics about the fields not editable ...

0
 
LVL 2

Author Comment

by:Bongos
ID: 22677610
OK, I understand about making the fields editable. For storing the changes am I best to capture the BeforePost and store away via my previous stored proc as I presume it'll no longer update the DB directly?
0
 
LVL 38

Accepted Solution

by:
Geert Gruwez earned 375 total points
ID: 22678142
it will update a cache and then do BeforePost
I don't use ADO anymore, but it seems a good choice to post the updates
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question