Solved

Offline dataset

Posted on 2000-05-10
11
561 Views
Last Modified: 2008-03-06
I use ADO components to connect to MS-SQL server using Delphi 5. I need to connect to server, retreive data and close the connection with the server and keep the table/stored procedure open.
I tried to use SaveToFile and LoadFromFile, but it still requere connection with the server.
I also create a temporary Paradox table to store this data, but it takes long time and quite complex.
I didn't want to change retreived data, only I want to read it.

Thanks for your pacience.

Motaz Abdel Azeem
0
Comment
Question by:Motaz
[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
  • 6
  • 4
11 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 2798928
hi motaz,

do you know, that the rx-library contains a memory table, where you can copy in your resultset ?

meikl
0
 
LVL 10

Expert Comment

by:ECollin
ID: 2799109
hi,

you can use the TClientDataSet as a memory table.

Emmanuel
0
 
LVL 7

Author Comment

by:Motaz
ID: 2799209
How can I copy the data from ADOStoredProc to TClientDataSet?

Motaz
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:ECollin
ID: 2800583
Motaz,

in the IDE just right click on the TClientDataSet component and select "Assign Local Data" option.
Then, select your SP.

Emmanuel
0
 
LVL 10

Expert Comment

by:ECollin
ID: 2800701
Motaz,

at run-time you just have to set the provider property of your TClientDataset like this :

ClientDataSet1.Provider := myPS.Provider;
MyPS.Open;
ClientDataSet1.Open;

That's all

Emmanuel
0
 
LVL 7

Author Comment

by:Motaz
ID: 2806592
Emmanuel, it didn't work, there is no property called Provider in ClientData set. Is it ProviderName, and there is no Provider property in StoredProc1.

Motaz
0
 
LVL 10

Expert Comment

by:ECollin
ID: 2809721
Hi Motaz,

Which version of Delphi are you using ?
I'm using Delphi 3 C/S and it works fine.
The property "Provider" is not published.
Add "BdeProv" in the clause Uses of your unit.
Verify that you have the DBCLIENT.DLL in the WinNT\System32 directory.
If you want I can mail you some code.


Emmanuel
0
 
LVL 7

Author Comment

by:Motaz
ID: 2809940
I use Delphi 5 Enterprise, the Provider is not exists at all.
0
 
LVL 10

Expert Comment

by:ECollin
ID: 2810052
you're right. The property has been removed in Delphi 5!
Give me just the time to install D5 and to find your solution.

Emmanuel
0
 
LVL 10

Accepted Solution

by:
ECollin earned 80 total points
ID: 2810125
With Delphi 5, it seems you have to use a DataSetProvider (Midas) to link the dataset (Stored proc) to the clientDataSet.

Put a Datasetprovider on your form.
Set his DataSet property with your stored proc.

Set the ProviderName property of the clientdataset to the Datasetprovider.

Emmanuel
0
 
LVL 7

Author Comment

by:Motaz
ID: 2829988
Thanks it works
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 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