Solved

Offline dataset

Posted on 2000-05-10
11
560 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
  • 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Suggested Solutions

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

765 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