Bender
Member
Posts: 19
Registered: 1/11/2005
Member Is Offline
|
| posted on 1/11/2005 at 10:44 AM |
|
|
Problems with database
I'm trying to implement the protreemenu with an access database and have encountered some problems:
1. Using ASP/VBScript the menu works but I can't access to a database that's in a different directory like ../database/db
2. Using ASP/JavaScript as a server Model, the menu doesn't work. I'm getting a compilation error (Microsoft JScript (0x800A03EC) with the
Call build_hierarchy
Could you please provide a javascript version of the items.asp script? Most of my sites are programmed with ASP/JavaScript and I don't wan't
to convert them all.
Thanks
error call
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 1/11/2005 at 11:32 AM |
|
|
We don't use VBScipst within our download packages, only JS. I don't understand the issue.
|
|
|
Bender
Member
Posts: 19
Registered: 1/11/2005
Member Is Offline
|
| posted on 1/11/2005 at 12:11 PM |
|
|
Isn't the item.asp written in VBScript?
I found it inside the add-ons/asp_vb_database folder. It's the include file for the build_hierarchy_var and build_hierarchy functions (variables
are declared as Dim not var, sounds VB to me ;) ).
Are there other examples with asp-DB-solutions?
|
|
|
Bender
Member
Posts: 19
Registered: 1/11/2005
Member Is Offline
|
| posted on 1/11/2005 at 12:15 PM |
|
|
I'm working with dreamweaver and ASP/JS model.
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 1/11/2005 at 01:29 PM |
|
|
I mean we don't use VBScript in cientside solutions. For asp DB serverside item-building addon we use ASP-VB scripting. How do you propose to use
JS at serverside?
|
|
|
Bender
Member
Posts: 19
Registered: 1/11/2005
Member Is Offline
|
| posted on 1/11/2005 at 01:51 PM |
|
|
I guess it would be fine if I could use a item.asp file that's written in javascript instead of VB. Or is this not possible? I do get compilation
errors when I define a recordset in Javascript and call the build_hierarchy fuction to build the tree.
What about the "../" problem calling a database from subdirecory? Does that work?
Is it possible to add an accesslevel functionality (based on database entries) to the menu?
Thx for your help :)
|
|
|
Bender
Member
Posts: 19
Registered: 1/11/2005
Member Is Offline
|
| posted on 1/11/2005 at 02:23 PM |
|
|
Just an short overview:
I created a test.asp with asp/javascript model
I created a recordset with the menu data
I run the included items.asp with <SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
I call the database directly with <%Call build_hierarchy ...
I'get the following compîlation error:
Microsoft JScript (0x800A03EC)
';' expected
(...)
Call build_hierarchy("dataconnect", 0 , "TREE_ITEMS", "WEB_NAV_SIDEBAR", "SBLID", "SBTID",
"title", "home_url")
----^
If I run the page with ASP/VB as a server model, the menu works fine.
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 1/12/2005 at 09:27 AM |
|
|
You could find the proper call of build_hierarchy_var within the 'add-ons/asp_vb_database/demo.asp' from your download package. There's
also installation and setupping instructions within every add-on's folder (add-ons/asp_vb_database/index.html)
|
|
|