- Shopping Bag ( 0 items )
In Intranet & Web Databases For Dummies, programming ...
Ships from: acton, MA
Usually ships in 1-2 business days
In Intranet & Web Databases For Dummies, programming wizard Paul Litwin introduces you to the concepts behind intranet and Web databases -- and then gets right into the nuts and bolts of setting up your own database. He shows you how to use powerful but easy-to-use software (such as Microsoft Access, SQL Server, Visual InterDev, Internet Information Server, the Internet Database Connector, and Active Server Pages) to make your internal and external Web pages useful and full of accurate, timely information.
Plus, on the bonus CD-ROM accompanying Intranet & Web Databases For Dummies, you get valuable software and other resources, including
- About This Book
Conventions Used in This Book
How This Book Is Organized
- Part I: Building Better Intranets and Web Sites
Part II: And You Thought Web Publishing Was Hard
Part III: What About SQL Server Data?
Part IV: Getting Dynamic with the Internet Database Connector
Part V: The Future Is Here: Active Server Pages
Part VI: Coding Active Server Pages
Part VII: A Virtual Web Publishing Studio: Visual InterDev
Part VIII: The Part of Tens
- Icons Used in this Book
What's On the CD?
Where to Go from Here
- Chapter 1: Clients, Servers, and Browsers in All Their Glory
How the Web Works
- Terminology Primer
How the parts work together
- Static versus Dynamic Web Pages
- Static content
- Chapter 2: Setting Up Your Microsoft Web Server
Choosing a Microsoft Web Server
- Why are Microsoft Web servers different?
So many servers, so little time
Which one is right for me?
How about the Web server version?
What about Microsoft Commerce Server?
- Implementing Your Microsoft Web Server
- Acquiring Microsoft Web servers
Installing Microsoft Web servers
Setting up virtual directories
- Other Web Servers
- IIS-compatible servers
- Chapter 3: A Wizard after Your Own Heart
Creating Your Web Page
Testing Your Page
- One more thing...
- Digging into the Static HTML Pages Produced by the Wizard
- Viewing the source
Modifying the HTML
Viewing your changes
- Chapter 4: Spiffing Up Your Pages
What Other Kinds of Objects Can I Publish?
Publishing Access Reports
- Running the wizard
Time to take a look
What the wizard publishes
What the wizard doesn't publish
- Publishing a Multipage Access Report
- No template
Using a custom template
- Creating Custom Templates
- Anatomy of a template
Not just for reports
- Chapter 5: Posting and Republishing Pages
Integrating Your Pages into Your Web Site
The Postman Always Rings Twice
- When the server's just around the corner
When the server's across town
- Using the Web Publishing Wizard
- Posting Web pages to a server for the first time
Republishing to a Web server using the wizard
- Don't Reinvent: Use Publication Profiles
- Creating a publication profile
Recalling a publication profile
- Sloughing Off with VBA
- Using frmPublish
A possible hitch
- Like Clockwork
- The timer event
- Chapter 6: A Wizard That Speaks SQL
The Server Advantage
- A page with a view
Free-form like a bird
Stored procedure, anyone?
- Chapter 7: Keeping Your Pages Fresh
- You can pay me now or pay me later
Which option is best?
- Using a Template
URLs Are Us
How Does It Work?
Is That All There Is to the Assistant?
- Chapter 8: Generating Dynamic Web Pages with the Access Wizard
Publishing to the IDC Format
- How you publish
What you get
Making the IDC files work
Copying the files to your server
Creating the ODBC data source
Previewing the results
The results of the IDC query
My users won't type that!
- What Else Can You Publish?
Publishing Parameter Queries
Chapter 9: Exploring the Innards of IDC
How the IDC Works
- The IDC file
The HTX file
- Beyond Read-Only Queries
- The AddCustomer.HTML file
The AddCustomer.IDC file
The AddCustomer.HTX file
Testing the example
- Making the IDC Dance
- Limiting the records
The IDC and \delimiters
Displaying parameter values
- How IDC Stacks Up against the Alternatives
- Chapter 10: Creating Hyperactive Datasheets
What Can You Publish to the ASP Format?
What's Required to Publish to the ASP Format?
Publishing a Table or Query to ASP
The Wizard Output
Using the ASP Page
- On an intranet server
On an Internet server
What you get
- Publishing Parameter Queries to ASP
- Preparing the query
Publishing the query
The resulting files
Linking to the parameter query page
- Is That All There Is to Publishing to the ASP Format?
Chapter 11: Publishing Radioactive Forms
Publishing an Access Form
The Published ASP Files
Previewing the Results
Publishing a Form with an Embedded Subform
Using the Published Forms
Publishing Better Forms
- What's published and what's not?
- How Wizard-Generated Pages Stack Up Against the Alternatives
- Chapter 12: Delving into Active Server Pages
What Exactly Is an Active Server Page?
- Conditional processing
- Exploring VBScript
- One page at a time
A scripted page
Once and for all
- Is That All There Is?
Chapter 13: Activating Your Pages with ADO
What's ActiveX Data Objects?
The ADO Object Model
Accessing Data Using ADO
- Pure HTML
Creating the recordset object
Displaying the data
- Flattening the Object Model
- Recordset options galore
Constants -- what constants?
Another recordset example
Declaring variables and constants
Opening a connection
Creating the recordset
What if the recordset doesn't contain any records?
Displaying the table
- Updating Data
- Adding records to a recordset
What about handling errors?
VBScript error handling
The ADO errors collection
Which one should I use?
An error-handling example
Updating a record in a recordset
Deleting a record from a recordset
- Executing Queries and Stored Procedures
- A stored procedure example
An action query example
- Chapter 14: Are You Ready for Visual InterDev?
Why Visual InterDev?
The Visual InterDev Way
- A Product with More Than One View
The Wonderful World of InfoView
- Drilling down to a page
Searching the InfoView system
- Creating a Web Project
- Creating a new HTML page
Editing your page
Choosing the right editor
Creating a new ASP page
Importing existing files
- Previewing Your Pages
- Using the built-in InfoViewer browser
Using another browser
- Working with Working Copies
Chapter 15: Discovering the Data Form Wizard
The Visual InterDev Data Form Wizard
Running the Wizard
Using the Data Form
- Form View
- Advanced Wizard Features
- Custom labels
Image and URL fields
- Chapter 16: Designing with Designer Controls
What's a Designer Control?
- Why use designer controls?
How do designer controls differ from wizards?
- Using the Data Range Controls
- Creating the data connection
Creating an HTML table with the Data Range controls
Creating an HTML form with the Data Range controls
- Using the SQL Query Designer
- Starting the SQL Query Designer
Exploring the SQL Query Designer
Creating an ad-hoc query
Returning to the Properties window
What else can you do?
- Using the Data Command Control
- Creating a delete query with a parameter
Passing the parameter to the script
- Using the Include Control
Editing the Scripts Produced by Designer Controls
Chapter 17: Scripting Active Server Objects
What's an Active Server Object?
Managing State with the Session Object
- What defines a session?
How and when does the Session object work?
What happens when the browser doesn't support cookies?
Saving session data
What about Global.asa?
A session event procedure example
Global.asa and data connections
- Sharing across Sessions with the Application Object
- Application events
Creating a hit counter
- Writing Values with the Response Object
- Writing text
Redirecting Johnny through the front door
- Reading Values with the Request Object
- Retrieving form fields
Checking whether cookies are enabled
Grabbing data from the Query string
Server variable anyone?
- Extending ASP with the Server Object
- A MapPathing example
Encoding we will go
Creating your own components
- Is That All There Is to Visual InterDev?
- Chapter 18: Ten Things to Consider When Choosing Web Publishing Software
Which Web Server Are You Running?
Will Your Site Be on an Intranet or Internet?
What Sort of Traffic Are You Expecting?
Where's the Data?
How Much Time and Money Do You Have?
How Dynamic Do You Need the Data?
What's the Difference Between CGI, IDC, and ASP?
What Other Solutions Are Out There?
What About FrontPage?
What Do I Use to Process Credit-Card Transactions?
Chapter 19: Ten Things That Can Go Wrong with Dynamic Web Publishing and How to Fix Them
Why Do I See My ASP Script in the Browser?
Why Can't I Get My IDC or ASP Page to Come Up?
Why Do I Get "Access Forbidden" or "HTTP/1.0 501 Not Supported" Errors?
Why Did All My ASP Files Suddenly Stop Working?
It Works Great On My Development Machine, But...
I Keep Getting an Illegal Name Error When Accessing SQL Server Data
How Do I Format a Field Using IDC?
Why Don't My Access Wizard-Published Parameter Query Pages Work?
Why Do I See a Blank Page in the Browser?
Why Don't My Access Forms Containing Subforms Work?
Chapter 20: Ten Common Questions about Visual InterDev
Why Should I Buy Visual InterDev?
What's the Difference Between a Project and a Workspace?
What the Heck Is this Default.asa File?
Should I Create a Data Connection or a Database Project?
How Do I Get Visual Database Tools to Process My Database Schema Changes?
Why Don't the Data Range Controls Display Anything When I Browse the Page?
How Do I Check My Links?
Which Editor Should I Use: FrontPage or Source Editor?
How Do I Visually Lay Out an HTML Table, Form, or Frame?
- System Requirements
How to Use the CD
What You Find on the CD
- Sample Access database
Sample SQL Server database
Sample IDC files
Sample ASP files
Sample ADO files
Sample Active Server object files
Access Upsizing Tools
Internet Explorer 4.0
Job Forum sample application
Microsoft Office 97 viewers
System DSN tester
- If You Have Problems (Of the CD Kind)
In This Chapter
The real advantage to using the Access Publish to the Web Wizard to publish to the Active Server Pages (ASP) format is apparent when you publish forms. When you publish a form using the ASP format, the wizard generates an ASP page that looks and acts like an Access form. You can use the ASP page to view and update records in the Access database.
This chapter explores the publishing of Access forms to the ASP format and takes a look at the pluses and minuses of the Access-generated ASP pages.
Publishing an Access form to the ASP format is very similar to publishing a table or query to the ASP format, which I cover in Chapter 10.
Before you start publishing your Access forms to the ASP format, you need to have a few things in place:
Chapter 2 has more details on obtaining and configuring Microsoft Web servers and creating Web directories. I also discuss configuring your Web server for Active Server Pages in Chapter 10.
Following is a brief look at how to publish a form:
If the form you're publishing contains a subform, tab to the Server URL text box. Type the URL address of the virtual Web directory where the ASP files will be hosted. This address points to the virtual Web directory where you store the files, not the actual files (see Figure 11-2).
For example, if your Web server is accessible across an intranet, then type an address using the following syntax:
If you connect to the Web server across the Internet, then enter an address using the following syntax:
If the form doesn't contain a subform, you can leave the Server URL text box blank (see Figure 11-3). Entering an address doesn't do any harm, but getting an address wrong is easy. You may as well leave the text box blank. In addition, if you decide later to move the files to a different Web directory, the form won't work if you've entered a server URL here.
Enter whatever you want on the remaining wizard pages before clicking Finish.
When you use the Publish to the Web Wizard to publish an Access form, you end up with at least two files -- perhaps three, if you publish a form with an embedded subform. The files generated by the wizard are
For example, if you publish a form (with no subform) named frmMenuItems, the wizard generates the following files:
If you publish a form named frmOrders that contains an embedded subform named frmOrderItemsSub, you get the following files:
Before you can use your ASP files, you must perform three additional steps. These steps are identical to what you need to do when publishing a table or query to the ASP format:
Chapter 10 gives you all the details on these steps.
To view the wizard-published forms, you need to link to the main ASP page. But first, there's a catch.
The ASP files that the Access wizard generates differ in one important way from all the other Web pages that the wizard generates: You can view the ASP files only by using Microsoft Internet Explorer (IE) 3.0 or later. You need Internet Explorer because the wizard-generated ASP files send VBScript code that uses the HTML Layout control to the Web client.
The wizard uses the HTML Layout control to allow precise two-dimensional positioning of items on the page. This control runs only in browsers that support ActiveX controls, which, for now at least, means that you can view the wizard-published forms by using only Internet Explorer Version 3.0 or later.
As is the case in Chapter 10, the exact URL you link to varies, depending on if the Web server is on an intranet or the Internet.
If your Web server is accessible across an intranet, then you link to the ASP page using the following syntax:
server_name is the machine name of the Web server,
virtual_directory is the Web folder that hosts the Web page, and
form_1.asp is the name of the ASP page generated by the Access wizard.
For example, if your server name is
catfish and the published ASP file is
frmEmployees_1.asp and located in the
Web_Meals directory, you enter the following URL:
If you connect to the Web server across the Internet, then you link to the ASP page using the following syntax:
site_name is the domain name of the Web server,
virtual_directory is the virtual Web directory that hosts the Web page, and
form_1.asp is the name of the ASP page generated by the Access wizard.
For example, if your site name is
web_meals.com, and the published ASP file is
frmEmployees_1.asp and located in the root directory of the Web server, you enter the following URL:
When you link to the wizard-generated ASP page using Internet Explorer, the ASP query executes on the server and the ASP engine generates a Web page consisting of a mixture of HTML and VBScript on the fly and returns the page to the browser. Because the Web page contains VBScript and references to the HTML Layout control, you need to use a Microsoft browser, as shown in Figure 11-4.
If you compare the ASP version of the form with the original Access form (shown in Figure 11-5), you can see that the wizard does an admirable job in converting the Access form into the Web equivalent.
If you attempt to view the page in a browser that doesn't support ActiveX controls and VBScript, you get a page that looks similar to the one shown in Figure 11-6.
The trick to publishing a form with a subform successfully is to get the Server URL address on page 5 of the wizard correct. See Figure 11-2 and the discussion in the section "Publishing an Access Form" for more details.
The wizard publishes subforms only in datasheet view and only as read-only HTML tables. To function properly, the published subform must link to the main form using the LinkChildFields and LinkMasterFields properties of the subform control, not custom VBA code. In addition, the wizard doesn't support nested subforms.
For example, the Meals.mdb database contains a form, frmOrders, with an embedded subform (frmOrderItemsSub). The Access version of this form appears in Figure 11-7.
The Access Publish to the Web Wizard does a good job converting the frmOrders form to an ASP form, as shown in Figure 11-8. As with all published subforms, the subform itself becomes read-only when converted to the ASP format.
The ASP version of your Access form attempts to mimic the look and behavior of the Access form it's based on. However, a few differences crop up in how the ASP version of the form works:
Bound list box controls do not behave correctly. When browsing a saved record, the list box doesn't highlight the correct value.
The code behind the Access Publish to the Web Wizard does some amazing things. A sophisticated algorithm analyzes the Access form and spits out ASP code to simulate the look and feel of the Access form. The wizard hardly does a perfect job, however, and in fact has problems converting certain form elements.
Forms in Access can be quite a bit more complex than tables or queries. As you may guess, the Access Publish to the Web Wizard can't convert everything on a form to a Web page. Table 11-1 summarizes which parts are published and which parts aren't.
Table 11-1 What Parts of an Access Form Does Access Publish to the Web Wizard Publish?
|Yes||Wizard doesn't support data binding.|
Background color of form section
Color and font properties of controls
|Yes||The wizard preserves any hyperlink attached to the command button. (The wizard doesn't publish macros and VBA code attached to the command button.)|
Format and InputX of form section
|Yes||The wizard preserves any hyperlink attached to the label.|
|Yes||Bound list boxes don't behave properly. (See the earlier section "Using the Published Forms.")|
|Yes||Wizard doesn't publish frame.|
Picture property of form
|Yes||Only as read-only datasheets.|
|Yes||If the control is bound to a hyperlink field, the hyperlink isn't active.|
Unbound or bound object frame
As you can see from Table 11-1, the wizard doesn't publish many parts of a form, including VBA code, macros, images, lines, rectangles, and expressions.
To minimize your headaches when publishing forms, consider the following tips and tricks:
<DIV>. This tag should look something like the following:
<DIV ID=" frmEmployees_1alx"
STYLE="LAYOUT:FIXED;HEIGHT: 222;WIDTH: 528;">
<DIV> tag controls the insertion of the HTML Layout control. You can change the color of the HTML Layout control by inserting a
BACKGROUND tag between
ID using the standard HTML color values. (For color values, see HTML For Dummies®, 3rd Edition, by Ed Tittel and Stephen N. James, published by IDG Books Worldwide, Inc.) For example, to change the background color to a yellowish hue, you change the preceding lines of code to:
<DIV BACKGROUND=" #fce503" ID=" frmEmployees_1alx"
STYLE="LAYOUT:FIXED;HEIGHT: 222;WIDTH: 528;">
http:address with the new address.
www.microsoft.comand install the control onto your system. This process may take several minutes, so be patient. The download may fail, however, for a variety of reasons, including:
The Access Publish to the Web Wizard makes it easy to publish Access forms to ASP pages that you can use to view and update the records. The pages that the wizard produces, however, have several shortcomings.
Alternatives to the Access-generated pages are not without shortcomings of their own:
In the next part of this book, you explore another alternative: Microsoft Visual InterDev. You use this powerful tool to produce ASP pages that share many of the strengths of the Access Publish to the Web Wizard-generated pages, while not sharing many of its shortcomings.