ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: APPML :: AppML FAQ

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

APPML
AppML ¼ò½é
AppML °¸Àý
AppML °¸Àý˵Ã÷
AppML ÍøÂç·þÎñ
°¸ÀýÑо¿¼ò½é
°¸ÀýÑо¿£ºÊý¾Ý¿â
°¸ÀýÑо¿£ºAppML
°¸ÀýÑо¿£ºHTML ±..
°¸ÀýÑо¿£ºHTML ±..
°¸ÀýÑо¿£ºÄ¿Â¼
°¸ÀýÑо¿£º²úÆ·
°¸ÀýÑо¿£ºÍÐÔËÈË
°¸ÀýÑо¿£º¹©Ó¦ÉÌ
°¸ÀýÑо¿£º¿Í»§
°¸ÀýÑо¿£º¹ÍÔ±
°¸ÀýÑо¿£ºÓ¦ÓóÌ..
°¸ÀýÑо¿£ºÏÂÔØ
AppML FAQ
AppML Îĵµ
AppML Êý¾Ý¿âÔªËØ

AppML FAQ


×÷Õß:w3pop.com ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ä¯ÀÀ:4036 :: ::

This page contains a selection of common mistakes and problems reported from developers who have tried to download and run the AppML examples on their own computer.
Õâ¸öÒ³Ãæ°üº¬ÁËÏÂÔØ¡¢ÔËÐÐAppMLµÄ³£¼û´íÎóºÍÎÊÌâµÄ±¨¸æ¡£


Your Web Server Must Be IIS
ÄãµÄÍøÂç·þÎñÆ÷±ØÐëÊÇIIS

The case study examples will only run on a Microsoft Internet Information Server (IIS).
°¸ÀýÑо¿ÖеÄÀë×ÓÖ»ÄÜÔÚIISÉÏÔËÐС£

All Windows servers, and Windows XP professional, support IIS.
ËùÓеÄWindows·þÎñÆ÷ÒÔ¼°Windows XPרҵ°æ£¬¶¼Ö§³ÖIIS¡£


Files Must Be Stored In A Web Folder
Îļþ±ØÐë´æ·ÅÔÚÍøÂçÎļþ¼ÐÖÐ

Your downloaded files MUST be stored in a web folder.
ÄãÏÂÔØµÄÎļþ±ØÐë´æ·ÅÔÚÍøÂçÎļþ¼ÐÖС£

The case study examples will only work when the files are stored in a folder that is recognized by your Web server.
½öµ±Îļþ´æ·ÅÔÚÍøÂç·þÎñÆ÷¿Éʶ±ðµÄÎļþ¼ÐÖÐʱ£¬°¸ÀýÑо¿ÖеÄÀý×Ó²ÅÄÜÔËÐС£

Note: For security reasons your databases should NOT be stored in a web folder.
×¢Ò⣺´¦ÓÚ°²È«ÒòËØ¿¼ÂÇ£¬ÄãµÄÊý¾Ý¿â²»Òª´æ´¢ÔÚÍøÂçÎļþ¼ÐÖС£


Don't Forget the Database
²»ÒªÍü¼ÇÊý¾Ý¿â

The case study is using the Microsoft Access database Northwind.
°¸ÀýÑо¿Ê¹ÓÃÁË΢ÈíAccessÊý¾Ý¿âNorthwind¡£

The case application expects to find the Northwind database at db/northwind.mdb on your web.
°¸ÀýÓ¦ÓóÌÐòÔÚ·þÎñÆ÷µÄdb/northwind.mdbÖвéÕÒNorthwindÊý¾Ý¿â¡£

Please refer to the chapter "Case Download" if you want to use another database.
Èç¹ûÄãÏ£ÍûʹÓÃÁíÍâÒ»¸öÊý¾Ý¿â£¬ÇëתÈë“°¸ÀýÏÂÔØ”ÕâÕ½øÐÐѧϰ¡£


Your Browser Must Support Cookies
ÄãµÄä¯ÀÀÆ÷±ØÐëÖ§³ÖCookies

The case study examples use cookies to maintain state information between AppML services.
°¸ÀýÑо¿ÖеÄÀý×ÓʹÓÃcookiesÀ´Î¬»¤AppML·þÎñÆ÷µÄ³ÂÊöÐÅÏ¢¡£

The examples will only work if your browser supports cookies.
½öµ±ÄãµÄä¯ÀÀÆ÷Ö§³Öcookiesʱ£¬¸Ã°¸Àý²ÅÄܹ»ÔËÐС£


Test the Application Address
²âÊÔÄãµÄÓ¦ÓóÌÐòµØÖ·

After download you can test-run the application by copying the following into the address field of your browser:
Äã¿ÉÒÔͨ¹ý¸´ÖÆÏÂÃæµÄÕâ¶ÎÁ´½ÓµØÖ·µ½ä¯ÀÀÆ÷ÖеĵØÖ·À¸ÖÐÀ´ÏÂÔØ ²âÊÔ-ÔËÐÐ Ó¦ÓóÌÐò¡£

http://localhost/appmlcase/appml_test.htm

Remember:
Çë¼Çס£º

If you have installed the application on a computer different from your own, you must substitute "localhost" with that computer's IP address.
Èç¹ûÄãÒѾ­½«Ó¦ÓóÌÐò°²×°ÔÚÁËÁíÍâһ̨·þÎñÆ÷ÉÏ£¬Äã±ØÐëÒÔ¸Ą̃¼ÆËã»úµÄIPµØÖ·À´Ìæ»»“localhost” ¡£

If you have installed the application in a folder different from appmlcase, you must substitute "appmlcase/appml_test.htm" with "foldername/appml_test.htm".
Èç¹ûÄãÒѾ­½«Ó¦ÓóÌÐò°²×°ÔÚÁ˲»Í¬ÓÚappmlµÄÎļþ¼ÐÖУ¬Äã±ØÐëʹÓÓfoldername/appml_test.htm” À´Ìæ»»"appmlcase/appml_test.htm"¡£


Start the Services From a Link
´ÓÒ»¸öÁ´½Ó¿ªÊ¼·þÎñ

AppML services should be started from a link on a Web page.
AppML ·þÎñÓ¦¸Ã´ÓÍøÒ³ÖеÄÒ»¸öÁ´½Ó¿ªÊ¼¡£

This HTML code example can be used to start an AppML service:
HTML´úÂë°¸Àý¿ÉÒÔÓÃÓÚÆô¶¯Ò»¸öAppML·þÎñ¡£

<a href="appml.asp?appname=example&displaytype=report">Testing Example</a>
<a href="appml.asp?appname=example&displaytype=report">²âÊÔ°¸Àý</a>

Remember to include a path if the linking page is not in the same Web folder as the AppML service:
Çë¼Çס£¬Èç¹ûÁ´½ÓÒ³ÃæËùÔÚµÄÍøÂçÎļþ¼ÐÓëAppML·þÎñËùÔÚµÄÍøÂçÎļþ¼Ð²»Ò»Ö£¬ÄÇôһ¶¨ÒªÖ¸Ã÷·¾¶£º

<a href="testfolder/app_htmlreport.asp?appname=example">Testing Example</a>
<a href="testfolder/app_htmlreport.asp?appname=example">²âÊÔ°¸Àý</a>

Remember to include a correct path if your XML files are not in northwind folder:
Çë¼Çס£¬Èç¹ûÄãµÄXMLÎļþ²¢²»Î»ÓÚnorthwind Îļþ¼Ð£¬ÄÇôÐèÒªÖ¸Ã÷ÕýÈ·µÄ·¾¶£º

<a href="app_htmlreport.asp?appname=foldername/example">Testing Example</a>
<a href="app_htmlreport.asp?appname=foldername/example">²âÊÔ°¸Àý</a>


Remember the Appname Parameter
Çë¼ÇסAppname²ÎÊý

AppML services will not run without the appname parameter.
AppML ·þÎñ²»»áÔËÐв»°üº¬appname²ÎÊýµÄ³ÌÐò¡£

This is correct: appml.asp?appname=example
ÕâÊÇÕýÈ·µÄ£ºappml.asp?appname=example

This is wrong: appml.asp
ÕâÊÇ´íÎóµÄ£ºappml.asp


Don't Use XML File Extensions
²»ÒªÊ¹ÓÃXMLÎļþÀ©Õ¹Ãû

This is correct: appml.asp?appname=example
ÕâÊÇÕýÈ·µÄ£ºappml.asp?appname=example

This is wrong: appml.asp?appname=example.xml
ÕâÊÇ´íÎóµÄ£ºappml.asp?appname=example.xml


Remember the ASP File Extensions
Çë¼ÇסASPÎļþÀ©Õ¹Ãû

This is correct: appml.asp?appname=example
ÕâÊÇÕýÈ·µÄ£ºappml.asp?appname=example

This is wrong: appml?appname=example
ÕâÊÇ´íÎóµÄ£ºappml.?appname=example


Error With Fields Named "id"
ÃûΪ“id”µÄ×ֶδíÎó

AppML will not work correctly if an HTML form contains an input field named "id".
Èç¹ûHTML±íµ¥°üº¬ÁËÃûΪ“id”µÄÊäÈë×ֶΣ¬ÄÇôAppML½«²»ÄÜÕýÈ·µÄ¹¤×÷¡£

The reason for this is an error in Internet Explorer that returns the content of the field named "id" instead of the form attribute "id" in the statement form.getattribute("id") in the source code.
²úÉú´íÎóµÄÔ­ÒòÊÇ£ºÈç¹û·µ»ØµÄÊÇÃûΪ“id” µÄ×Ö¶ÎÄÚÈÝ£¬¶ø·ÇÔ´´úÂëÖÐ.getattribute("id")Óï¾äÖеēid” ÊôÐÔ£¬ÄÇô£¬IE½«»á·¢ËÍ´íÎóÏûÏ¢¡£

The result is an "Error in page" message from Internet Explorer.
IE½«»á·¢ËÍÒ»Ìõ“Ò³Ãæ´íÎó”µÄÏûÏ¢¡£


Error With <textarea>
<textarea>´íÎó

AppML will not work correctly if an HTML form contains a textarea field that is closed within the opening tag.
Èç¹ûHTMLÖÐδ°üº¬“textarea”×ֶεĽáÊø±êÇ©£¬ÄÇô£¬AppML½«²»»áÕý³£¹¤×÷¡£

Correct: <textarea rows="10" cols="80" id="notes"></textarea>
ÕýÈ·£º<textarea rows="10" cols="80" id="notes"></textarea>

Incorrect: <textarea rows="10" cols="80" id="notes" />
´íÎó£º<textarea rows="10" cols="80" id="notes" />


WHERE Clause In SQL
SQLÖеÄWHERE×Ó¾ä

AppML will not work correctly if you use a WHERE clause in your SQL statements. The correct place to add a WHERE clause is in the <filters> element. This enables AppML to dynamically change the WHERE clause at runtime.
Èç¹ûSQLÓï¾äÖаüº¬WHERE×Ӿ䣬ÄÇôAppML½«»á·¢Éú´íÎó¡£ÕýÈ·µÄ·½·¨Êǽ«WHERE×Ó¾äÌí¼ÓÔÚ<filters>ÔªËØÖС£ÕâÄÜʹµÃAppMLÔÚÔËÐÐʱ£¬¶¯Ì¬µØ¸Ä±äWHERE×Ӿ䡣

Correct
ÕýÈ·£º

<sql>SELECT * FROM employees</sql>
<filters>
<where>name="Jonson"</where>
</filters>

Incorrect:
´íÎó£º

<sql>SELECT * FROM employees WHERE name="Jonson"</sql>


Max 500 Records In Screen Display
ÔÚÏÔʾÆ÷ÖÐÏÔʾ500Ìõ¼Ç¼

AppML limits the screen display of records to 500.
AppML¿ÉÒÔÔÚÏÔʾÆ÷ÖÐ×î¶àÏÔʾ500Ìõ¼Ç¼

We think it makes no sense to let a user list thousands of records to choose from. If the list is too long the user should use the filter to narrow his search.
ÎÒÃÇÈÏΪ£¬Èç¹ûÄܹ»Ê¹Óû§ÂÞÁÐÉÏǧÌõ¼Ç¼µÄ»°£¬ÕâÑù×öÊǷdz£ÓÐÒâÒåµÄ¡£Èç¹ûÁбíÌ«³¤£¬ÄÇôÓû§Ê¹ÓùýÂ˹¦ÄÜÀ´¼õÉÙËÑË÷µÄ¼Ç¼Êý¡£

This limit does not apply for reports. It is only a limitation for a screen list.
¸ÃÏÞÖÆ²»ÄÜÓ¦ÓÃÓÚ±¨¸æÖС£Ëü½öÊǶÔÏÔʾÁбíµÄÏÞÖÆ¡£


ÆÀÂÛ (0) All