PDA

View Full Version : Access و دلفی 8 (هر چه سریعتر بهتر)



Pichidehtarin
دوشنبه 24 فروردین 1383, 09:10 صبح
با سلام خدمت استادید محترم

اگه میشه بگین چطوری میشه بانک های اطلاعاتی Access رو به دلفی 8 ربط داد .
البته همه جورش رو میخوام .
VCL Forms Application و dbExpress
Win Forms Application
ASP .NET
ممنون میشم اگه سریعتر بهم جواب بدین .

Gladiator
سه شنبه 25 فروردین 1383, 10:01 صبح
<span dir=ltr>Building an ASP.NET Database Application

The following procedure describes the minimum number of steps required to build a simple ASP.NET database application using BDP.NET. After generating the required connection objects, the project displays data in a DataGrid.

BDP.NET includes component designers to facilitate the creation of database applications. Instead of dropping individual components on a designer, configuring each in turn, use BDP.NET designers to rapidly create and configure database components. The following procedure demonstrates the major components of ASP.NET, ADO.NET, and BDP.NET at work.

Building an ASP.NET application with BDP.NET components consists of four major steps:

Create an ASP.NET project.
Configure BDP.NET connection components and a data source.
Add a DataBind call.
Connect a DataGrid to the connection components.
Tip: For testing purposes, use the employee.gdb database included with Interbase, if included with your version of the product.

To create an ASP.NET project

Choose FileNewASP.NET Web Application.
The New ASP.NET Application dialog appears.

In the Name field, enter the name of your project.
In the Location field, enter the project path.
Tip: Most ASP.NET projects reside in the IIS directory: Inetpub\wwwroot.

To change Web server settings (optional)

In the New ASP.NET Application dialog, click View Server Options
The dialog expands to show additional server options.

Set the various read and write attributes of the project as needed or accept the defaults.
Tip: In most cases, the default settings will suffice.

Click OK.
The Web Forms designer appears.

To configure data components

Drag and drop a BdpDataAdapter component onto the designer. If necessary, select BdpDataAdapter .
In Object Inspector, select Configure Data Adapter.
The Data Adapter Configuration dialog appears.

If necessary, select the Command tab. From the Connection drop-down, select New Connection.
The Borland Data Provider: Connections Editor dialog appears.
Tip: Alternatively, use Data Explorer to drag and drop a table on to the designer surface. Data Explorer sets the connection string automatically.

To set up a connection

In Borland Data Provider: Connections Editor, select the appropriate item from the Connections list.
In Connection Settings, enter the Database path.
Note: If referring to a database on the local disk, prepend the path with localhost:. If using Interbase, for example, you would enter the path to your Interbase database: localhost:C:\Program Files\Borland\Interbase\Examples\employee.gdb (or whatever the actual path might be for your system).

Complete the UserName and Password fields for the database as needed.
Click Test to confirm the connection.
A dialog appears confirming the status of the connection.

Click OK to return to the Borland Data Provider: Connections Editor dialog.
Click OK to return to the Data Adapter Configuration dialog.
In the Command tab, the areas for Tables and Columns are updated with information from your connection.

To set a command

In the Select area, enter an SQL command.
Tip: For Interbase's employee.gdb database, you might enter select * from SALES, as an example.

Click the Preview Data tab.
Click Refresh.
Column and row data appear.

Click the DataSet tab.
Confirm that New DataSet is selected.
Click OK.
New components for DataSet and BdpConnection appear on the designer.

Select BdpDataAdapter component.
In Object Inspector, select the Active property drop-down and set the value to True.
To connect a DataGrid to a DataSet

Drag and drop a DataGrid web control onto the designer. If necessary, select DataGrid .
In Object Inspector, select the DataSource property drop-down. Select the DataSet component that you generated previously (the default is DataSet1).
In Object Inspector, select the DataMember property drop-down. Select the appropriate table.
The DataGrid displays data from the DataSet .

To add a DataBind call

Use the Object Inspector drop-down to select the WebForm (WebForm1 is the default).
In Object Inspector, select the Events tab.
Set the Load event to Page_Load.
In Object Inspector, double-click Page_Load.
The code-behind designer appears, cursor in place between event handler brackets.

Code the DataBind call: Self.dataGrid1.DataBind();
Note: If you are using data aware controls, for instance from a third-party provider, you may not need to code the DataBind call.

Choose RunRun.
The application compiles and the HTTP server displays a Web Form with the datagrid.

While presenting a minimum number of steps required to build a database project, the preceding procedure demonstrates the major components of the ASP.NET, ADO.NET, and BDP.NET architectures at work, including: providers, datasets, and adapters. The adapter connects to the physical data source via a provider, sending a command that will read data from the data source and populate a dataset. Once populated, a datagrid displays data from the dataset.

Once created, use other BDP.NET designers to modify and maintain the components of your project.

Related Information
ASP.NET Overview
ADO.NET Overview
Borland Data Providers for .NET
BDP.NET Component Designers
DB Web Controls for ASP.NET
Building a Windows Forms Database Application
Creating Database Projects from the Data Explorer


Borland® Copyright © 2003 Borland Software Corporation. All rights reserved.</span>

Pichidehtarin
سه شنبه 25 فروردین 1383, 19:02 عصر
ممنون
اگه میشه یه ترفند خیلی راحت برای VCL .NET و dbExpress میخوام .

phantasm
چهارشنبه 26 فروردین 1383, 13:46 عصر
یه سری کامپوننت برای dbExpress به همین نام توی قسمت categories موجوده.میتونی با استفاده از DataSource- SQLDataSet SQLConnectionو یه SQLTable یا SQLQuery .....به راحتی با دیتا بیس ارتباط برقرار کنی .فقط یادت باشه قبلش توی قسمت DataExplorer دیتابیس ت رو فعال کنی...

Pichidehtarin
چهارشنبه 26 فروردین 1383, 19:33 عصر
من فایل های VendorLibrary رو برای این اتصال تو سیستمم ندارم اگه شما دارین یا میدونین تو کدوم سایت هست بهم بگین ممون میشم .
من نمیخوام این بانک با سرور در ارتباط باشه (به اصطلاح بانک اطلاعاتی محلی) آیا dbExpress اینطور هست ؟
آیا پس از این اتصال میتونوم با همون شیوه قبل (شیوه موجود تو دلفی 7) از جدول خودم استفاده کنم ؟

اگه یه کم بیشتر توضیح بدین ممنون میشم .

MiRHaDi
شنبه 03 مرداد 1383, 17:42 عصر
سلام
اصلا مشکلی ندارد ! شما میتونید یک dataset و table بگذارید بعد از administrator tools برید odbc و ...
بعد توی databasename همونو بذارید بعد توی table ها میتونی سلکت کنیش و همین
بای

nima_north
دوشنبه 25 آبان 1383, 10:28 صبح
من همه کارهایی که آقای Gladiator گفتن رو انجام دادم ولی با این پیام مواجه شدم

Connection open failed. SQL State: 3028, SQL Error Code: -124520301
Cannot start your application. The workgroup information file is missing or opened exclusively by
another user.
اینو میدونم که دیتا بیس من جای دیگه باز نیست.
لطفا کمک کنید

Gladiator
دوشنبه 25 آبان 1383, 11:34 صبح
سلام ؛

فایل بانک اطلاعاتی رو در مسیر دیگه ای کپی کن ٬‌ مثلا
C&#58;\