DMXzone Database Connector ASP Support Product Page

Not a problem

Parent Paths!!!!!!!

Reported 22 Sep 2013 08:02:19
3
have this problem
22 Sep 2013 08:02:19 Peter Wiseman posted:
Why on Earth does the file this extension creates in the folder 'dmxDatabaseSources' contain '../' to indicate a parent directory?

There isn't a single ISP I work with which allows parent paths on their servers - is there an alternative?

Replies

Replied 22 Sep 2013 14:05:43
22 Sep 2013 14:05:43 Teodor Kuduschiev replied:
Hello Peter,

You see the '../' as your website is defined this way.
The extension is compatible with parents paths disabled option in IIS. So it will work just fine with parents path disabled - you only need to setup your DW site options to make all your links relative to site root.

Just go to your site definition options in DW, then Advanced Options, Local Info and select Links relative to: Site Root.

That will enable site root relative paths and will make the site work fine even if the parent paths are disabled.
Replied 23 Sep 2013 00:51:34
23 Sep 2013 00:51:34 Peter Wiseman replied:
That's all good.

However, no matter what I do I now get an error message saying: "file 'full path'/PageTextList does not exist".

When the message pops up the following script is highlighted in Dreamweaver's code window:

<script type="text/javascript">
/* dmxDataSet name "PageText" */
jQuery.dmxDataSet(
{"id": "PageText", "url": "PageTextList", "dataSourceType": "database", "dataType": "json"}
);
/* END dmxDataSet name "PageText" */
</script>
Replied 23 Sep 2013 06:05:21
23 Sep 2013 06:05:21 Teodor Kuduschiev replied:
Hello,

Did you recreate the database connection after you changed the site path settings?
Replied 23 Sep 2013 10:37:36
23 Sep 2013 10:37:36 Peter Wiseman replied:
"Did you recreate the database connection after you changed the site path settings?"

Yes. Started from scratch - I set this site as the 'Default Site' in IIS Manager.

I don't normally do this as there are around 150 sites on my Localhost server and I maintain a couple of dozen a day so switching about is a nuisance.

I run through the whole Data Bindings wizard, click the 'Test Source' button, then the 'Run Test' button.

The records in the table I've selected in the database display okay.

I click the 'Close' button, then the 'Apply' button, the 'OK' and the 'OK' again.

I then get a spinning hourglass for 30 seconds and a message box which says: "file:///D|Villawood/New WWW Meadows Gate/WWW/PageTextURL does not exist"

'D' is the HDD location of the Local Site Folder, "PageTextURL" is the name of the file created during the Data Bindings process which is present in a folder called "dmxDatabaseSources".

I've tried the whole process again with a blank page.

It generates the following code with the same "file does not exist" error message.:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script type="text/javascript" src="/ScriptLibrary/jquery-latest.pack.js"></script>
<script type="text/javascript" src="/ScriptLibrary/jspath.min.js"></script>
<script type="text/javascript" src="/ScriptLibrary/dmxDataBindings.js"></script>
<script type="text/javascript" src="/ScriptLibrary/dmxDataSet.js"></script>
<script type="text/javascript">
  /* dmxDataSet name "Test" */
       jQuery.dmxDataSet(
         {"id": "Test", "url": "PageTextURL", "dataSourceType": "database", "dataType": "json"}
       );
  /* END dmxDataSet name "Test" */
</script>
</head>

<body>
</body>
</html>


Replied 23 Sep 2013 11:56:41
23 Sep 2013 11:56:41 Teodor Kuduschiev replied:
Hello,

There is no need to set the site as 'Default Site' in your IIS Manager.

Please delete all of the dmx folders locally and start creating this on a blank new asp document. Define your database connection again.
When you define it and select it in the HTML5 Data Bindings as a source, the url generated in the code should be like:

"url": "dmxDatabaseSources/PageTextURL.asp?limit=25"

Replied 23 Sep 2013 12:38:36
23 Sep 2013 12:38:36 Peter Wiseman replied:
Followed the instructions above. Same result:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script type="text/javascript" src="/Villawood - Meadows Gate/ScriptLibrary/jquery-latest.pack.js"></script>
<script type="text/javascript" src="/Villawood - Meadows Gate/ScriptLibrary/jspath.min.js"></script>
<script type="text/javascript" src="/Villawood - Meadows Gate/ScriptLibrary/dmxDataBindings.js"></script>
<script type="text/javascript" src="/Villawood - Meadows Gate/ScriptLibrary/dmxDataSet.js"></script>
<script type="text/javascript">
  /* dmxDataSet name "Pagetext" */
       jQuery.dmxDataSet(
         {"id": "Pagetext", "url": "PageTextList", "dataSourceType": "database", "dataType": "json"}
       );
  /* END dmxDataSet name "Pagetext" */
</script>
</head>

<body>
</body>
</html>


I changed the code by hand:

{"id": "Pagetext", "url": "dmxDatabaseSources/PageTextList.asp", "dataSourceType": "database", "dataType": "json"}


Now the error message is "Error Loading Feed".

The folder in the Data Bindings area has a plus sign and below it an '@' symbol and the message "Error loading feed..."

The file: "PageTextList.asp" is as follows:

<%@Language=JScript CodePage="65001"%>
<!--#include virtual="/Villawood - Meadows Gate/dmxConnections/VillawoodData.asp" -->
<!--#include virtual="/Villawood - Meadows Gate/ScriptLibrary/dmxDatabaseConnector/json_encode.asp" -->
<!--#include virtual="/Villawood - Meadows Gate/ScriptLibrary/dmxDatabaseConnector/sqlBuilder.asp" -->
<!--#include virtual="/Villawood - Meadows Gate/ScriptLibrary/dmxDatabaseConnector/adapters/access/sqlBuilder.asp" -->
<script runat="server" language="jscript">

var cfg = //<<<JSON
{"type": "select", "table": "PageText", "columns": [{"table": "PageText", "column": "PageID", "alias": "", "sortable": false}, {"table": "PageText", "column": "PageTextLeft", "alias": "", "sortable": false}, {"table": "PageText", "column": "PageTextMain", "alias": "", "sortable": false}, {"table": "PageText", "column": "PageTextRight", "alias": "", "sortable": false}, {"table": "PageText", "column": "PageTitle", "alias": "", "sortable": false}], "wheres": [], "orders": [{"table": "PageText", "column": "PageTitle", "direction": "ASC"}], "joins": [], "meta": {"PageText": {"PageID": {"type": 3, "size": null}, "PageTextLeft": {"type": 130, "size": 0}, "PageTextMain": {"type": 130, "size": 0}, "PageTextRight": {"type": 130, "size": 0}, "PageTitle": {"type": 130, "size": 255}}}}
//JSON
;

var connection = new SqlConnection();
connection.execute(SqlBuilder(cfg), true);

</script>
Replied 23 Sep 2013 13:21:46
23 Sep 2013 13:21:46 Teodor Kuduschiev replied:
Thank you for the reply, Peter! Please contact us via our Live Support so we can resolve your issue faster.
Replied 23 Sep 2013 14:26:01
23 Sep 2013 14:26:01 Teodor Kuduschiev replied:
After a live chat session, we discovered that Peter had an old version of HTML5 Data Bindings installed. After updating the extension it all works fine now.

Reply to this topic