Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Offline dataset

Posted on 2000-05-10
11
Medium Priority
?
566 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 320 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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

688 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