PDA

View Full Version : ADO ,نمایش رکوردهای انتهایی یک جدول بسیار بزرگ در یک DBGrid



رضا عربلو
یک شنبه 22 آذر 1383, 21:42 عصر
1- یک ADOConnection را به sql server 2000 متصل کنید(با clUseServer, coAsyncConnect(

2 - یک AdoDataset را به آن متصل کنید (با clUseServer, ctDynamic) و یک جدول را به آن اختصاص دهید

3 - یک datasetprovider زا به adodataset متصل کنید.

4 - یک clientdataset را با این datasetprovider (با PacketRecords > 5) متصل کنید.

5 - یک dbgrid را ClientDataset متصل کنید.

خواهید دید که بلافاصله حتی با یک جدول چندین میلیون رکوردی می توانید داده ها را در dbgrid ببینید (البته بصورت غیر همزمان)

6- اما اشکال کار در این است که این dbgrid از اول جدول شروع به نمایش جدول می کند. اما اگر بخواهیم dbgrid فوراً شروع به نمایش رکوردها بکند بایستی چکار بکنیم؟
(نگویید که نمی شود چون cursorType = ctDynamic است وقتی که سریعاً به چند رکورد انتهایی جدول می رویم و clientdataset را اکتیو می کنیم dbgrid چند رکورد آخری را نمایش می دهد ولی قبلی ها را نمی تواند نمایش بدهد)

اصلاً چگونه می توان یک جدول بسیار بزرگ را از انتها در یک dbgrid سریعاً نمایش داد.(منتظر fetch شدن تمامی رکوردها از ابتدا نباشیم)

JavanSoft
دوشنبه 23 آذر 1383, 20:36 عصر
جواب شما فقط 1 کلمه است SDAC

Mahdi_S_T
چهارشنبه 25 آذر 1383, 17:13 عصر
جناب وکیلی .

آیا آموزش فارسی برای SDAC وجود دارد یا نه !

FirstLine
پنج شنبه 26 آذر 1383, 17:23 عصر
با سلام
این SDAC چیه؟ یه کامپوننته؟ با دلفی نصب میشه؟ از کجا گیرش بیارم؟
با تشکر

FirstLine
پنج شنبه 26 آذر 1383, 17:24 عصر
با سلام
این SDAC چیه؟ یه کامپوننته؟ با دلفی نصب میشه؟ از کجا گیرش بیارم؟
با تشکر

FirstLine
پنج شنبه 26 آذر 1383, 17:26 عصر
با سلام
این SDAC چیه؟ یه کامپوننته؟ با دلفی نصب میشه؟ از کجا گیرش بیارم؟
با تشکر

رضا عربلو
جمعه 27 آذر 1383, 01:22 صبح
مشکل در این است که clientDataSet متد GetPriorPacket را ندارد.

در ضمن
این SDAC چیه؟ یه کامپوننته؟ با دلفی نصب میشه؟ از کجا گیرش بیارم؟
با جستجو در اینترنت نسخه trialش رو گیر میاری

Delphi KDE
جمعه 27 آذر 1383, 03:58 صبح
SDAC مخفف SQL Data Access Component است و یک ابزار بسیار سریع برای کار با SQL است

http://crlab.com/images/sdac_palette.gif

اینم توضیحات کاملتر (امیدوارم زبانت خوب باشه)


SQL Server Data Access Components (SDAC) library offers a set of nonvisual components for Borland Delphi and C++ Builder. They provide access to Microsoft SQL Server and are an alternative to a standard way of accessing databases using Borland Database Engine (BDE).

SDAC uses OLE DB directly through a set of COM-based interfaces that expose data from a variety of sources. OLE DB interfaces provide applications with uniform access to data stored in diverse information sources, or data stores. These interfaces support the amount of DBMS functionality appropriate to the data store, enabling the data store to share its data.

Using BDE in MS SQL Server oriented client/server applications has some deficiencies. In many cases BDE community are unable to employ server specific features, they must tolerate excessive usage of resources, reduced speed of processing data, restricted distribution of an application and its administration.

Using BDE in database applications amounts to the following data path between server and client:

[SQL Server] <> [DBLibrary] <> [SQL Links] <> [BDE] <> [Application]

SDAC works directly through OLE DB, which is a native MS SQL Server interface. Applications with SDAC components access server directly:

[SQL Server] <> [OLE DB] <> [Application]

Components

SDAC includes following components:

TMSConnection - controls server connection;
TMSQuery - queries execution, operates record set, flexible way updating database tables;
TMSSQL - executes SQL statements;
TMSTable - allows to retrieve and update data single table without writing SQL statement;
TMSStoredProc - executes stored procedures and functions;
TMSSQLMonitor - allows to monitor dynamic SQL executing in SDAC based applications;
TMSConnectDialog - serves for enter username, password and server name;
TMSMetaData - allows to retrieve embracing metadata on specified SQL object;
TVirtualTable - dataset stores data in memory.
Key features

Following the main features of MySQL Data Access Components:

No distribution, installation and configuration is required for BDE and ODBC;
You can use any Delphi Professional Edition to develop client/server applications;
Supports MS SQL Server specific features: windows authentication, metadata, unicode fields, manual refresh for record in a dataset, automatic getting Identity value and results of triggers work and a lot of more;
Simplifies data updating;
Speeds up fetch of records from database;
Provides automatic refresh for records;
Advanced design time editors;
Interface (methods, properties) of SDAC components is similar to those of standard BDE data access components (TDatabase, TQuery, ..);
Extended SQL tracing capabilities provided by TMSSQLMonitor component and DBMonitor application;
Includes source code of TCRDBGrid enhanced data-aware grid control;
Wide data-aware and reporting components support, including InfoPower, ReportBuilder, FastReport;
and many other features.
Compatibility


SDAC supports SQL Server 2000, SQL Server 7 and MSDE. Following IDE are supported by SDAC: Borland Delphi 8, 7, 6 and 5, C++ Builder 6 and 5. Only Professional and Enterprise editions are supported.
اینم لینک برای دانلود اخرین نسخه (البته Trial)
http://www.crlab.com/sdac/sdac7.exe

FirstLine
چهارشنبه 16 دی 1383, 12:55 عصر
با سلام
اگر دیتابیس ما DBISAM باشد تکلیف چیست ؟
چجوری میشه 10 رکورد دوم یعنی فقط رکورد 10 تا 20 را نمایش داد؟
با تشکر