Adobe Dreamweaver CS3 Uživatelský manuál Strana 527

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 738
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 526
DREAMWEAVER CS3
User Guide
520
Sample OLE DB connection parameters for ASP.NET
An OLE DB connection string combines all the information your ASP.NET application needs to connect to a
database. Dreamweaver inserts this string in your pages server-side scripts for later processing by your application
server.
Dreamweaver provides you with string templates to create OLE DB connection strings for ASP.NET applications. To
create a connection string, you replace placeholders in the template with the requested parameter values. The
following are sample parameters for Microsoft Access and SQL Server databases.
Note: For the parameter values specific to other databases, see the database vendor’s documentation or consult your
system administrator.
Case 1: You have the .NET Framework on your local computer and you want to connect to a Microsoft Access
database called sdSchool.mdb located in the following folder on your hard disk: c:\Inetpub\wwwroot\SkyDive-
School\data\sdSchool.mdb. Here are the parameters to create this connection string:
Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=c:\Inetpub\wwwroot\SkyDiveSchool\data\sdSchool.mdb;
Case 2: You use the .NET Framework on a remote development server and you want to connect to a Microsoft
Access database called mtnSchool.mdb located on the server in the following folder:
d:\users\tara\projects\MtnDrivingSchool\data\mtnSchool.mdb. Here are the parameters to create the connection
string:
Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=d:\users\tara\projects\MtnDrivingSchool\data\mtnSchool.mdb;
Case 3: You use the .NET Framework on a networked development server called Savant and you want to connect to
a Microsoft SQL Server database called pubs on the server. Your SQL Server user name is “sa” and there is no
password. If you use the Managed Data Provider for SQL Server (that is, if you chose SQL Connection in the
Databases panel), here are the parameters to create the connection string:
Data Source=Savant;
Initial Catalog=pubs;
User ID=sa;
Password=;
Edit or delete a database connection
When you create a database connection, Dreamweaver stores the connection information in an include file in the
Connections subfolder in the sites local root folder. You can edit or delete the connection information in the file
manually or as follows.
If you rename a connection, update every data set (record set) that uses the old connection name by double-clicking
the recordset in the Bindings panel and selecting the new connection name in the DataSet dialog box.
Edit a connection
1
Open an ASP.NET page in Dreamweaver, then open the Databases panel (Window > Databases).
2 Right-click (Windows) or Control-click (Macintosh) the connection, and select Edit Connection from the menu.
3 MakethechangesandclickOK.Dreamweaverupdatestheincludefile,whichupdatesallthepagesinthesitethat
use the connection.
Delete a connection
1
Open an ASP.NET page in Dreamweaver, and then open the Databases panel (Window > Databases).
September 4, 2007
Zobrazit stránku 526
1 2 ... 522 523 524 525 526 527 528 529 530 531 532 ... 737 738

Komentáře k této Příručce

Žádné komentáře