w3pop.com :: ÍøÂçѧԺ :: APPML :: AppML FAQ
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µÄ³£¼û´íÎóºÍÎÊÌâµÄ±¨¸æ¡£
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¡£
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.
×¢Ò⣺´¦ÓÚ°²È«ÒòËØ¿¼ÂÇ£¬ÄãµÄÊý¾Ý¿â²»Òª´æ´¢ÔÚÍøÂçÎļþ¼ÐÖС£
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.
Èç¹ûÄãÏ£ÍûʹÓÃÁíÍâÒ»¸öÊý¾Ý¿â£¬ÇëתÈë“°¸ÀýÏÂÔØ”ÕâÕ½øÐÐѧϰ¡£
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ʱ£¬¸Ã°¸Àý²ÅÄܹ»ÔËÐС£
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"¡£
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>
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
This is correct: appml.asp?appname=example
ÕâÊÇÕýÈ·µÄ£ºappml.asp?appname=example
This is wrong: appml.asp?appname=example.xml
ÕâÊÇ´íÎóµÄ£ºappml.asp?appname=example.xml
This is correct: appml.asp?appname=example
ÕâÊÇÕýÈ·µÄ£ºappml.asp?appname=example
This is wrong: appml?appname=example
ÕâÊÇ´íÎóµÄ£ºappml.?appname=example
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½«»á·¢ËÍÒ»Ìõ“Ò³Ãæ´íÎó”µÄÏûÏ¢¡£
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" />
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>
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