Database - Recursive Function Calls

..:: The Specs:

MS Access 2000 (host charges extra for SQL/MySQL)
MS Windows Server 2003 (prod) / MS XP SP1 (dev)

..:: The setup:

The database has been setup with two tables;

tblDownloads
tblCatagories

Each "download" consists of a catagory field that corresponds to fldID in
tblCatagories. Each catagory, where the catagory is a parent, has a parent
field of value: 0 and each child, has a field with a value corresponding to
the fldID of it's parent. Code:

View Replies


ADVERTISEMENT

Recursive Calls

I have implemented a logic for my requirement with a recursive call. The logic is I need to get IDs from database for a scenario. There are corresponding records for each ID.

I need to store these IDs in an array variable. Then I need to get (dependent)IDs for the fields in each ID. There may be morethan one dependent per each ID. I append these IDs to my array. Like this it goes.

The problem is if there are many levels like this, the number of database cursor count is reaching to maximum and I'm getting the error

{Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC driver for Oracle][Oracle]ORA-00604: error occurred at recursive SQL level 1 ORA-01000: maximum open cursors exceeded }

each recursive call runs a SELECT query.

Can any one suggest me an alternate solution for this ?

View Replies View Related

Cursor Count Problem In Recursive Calls

I'm using the following function, which uses a recursive call. every time when I get a conf it opens a record set. So increases the cusor count. Some times I'm getting the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC driver for Oracle][Oracle]ORA-00604: error occurred at recursive SQL level 1 ORA-01000: maximum open cursors exceeded.

How can I avoid this ? Code:

View Replies View Related

Recursive Function

I need to write a recursive function and treeview using asp. It will show the manager and staffs under him/her. There will not be a fixed layer for the tree. Can someone guide me how to write?

View Replies View Related

Problem With A Recursive Function....

I have a table inside access DB built like a tree, every record(=node) is a "title" that has a 'name' and 'paret' fields (and some other fields that are not relevant).
I'm simpley trying to print out all the tree's records but I keep getting only a path from the root record to the first leaf.

I have a recursive sub called 'deleteTitles' that needs to perform this task.
The var 'currentTitle' is the root node.

On every iteration of the sub I print one son of the current node 'T'. Code:

View Replies View Related

Recursive Function Problem In ASP

I have adapted the code below but it gives me an error "exception occcured"
after the first recursion. Any ideas what can be done to make the following code work. Code:

View Replies View Related

Function Calls

I'm terribly sorry if this has been asked before, but I need a clear explenation without having to sift through other bits of information.

Can somone explain how functions work in asp (not asp.net)? I need to call a function that returns a value, and I get an error when I have a return statement in there. If there is no "return" statement, then what do you use to get this value back?

View Replies View Related

Recursive File Search Function Bug

I've recently made a recursive sub in asp to search all folder and subfolders of the map "file" for a certain filename. It will list all results and show a link.

Now there's still a bug. I can't place files in the root because this script won't find 'em. The root i mean files.

If i replace the empty dir with Server.MapPath("") it will show the files in the root but it will show 'em twice. Code:

View Replies View Related

Want Recursive SQL Query Function To Generate Breadcrumb Navigation

I'd want to make a custom class that will generate breadcrumb navigation for my site via a recursive query, e.g. Home > Page1 > Subpage 1. I've structured my database with hierarchical parent/child relationships.

I'm using ASP VBScript, and I have a table structure similar to the following: Code:

View Replies View Related

Optimizing Asp Database Calls

I'm very interested in finding out what ways you experts out there have made your data dips more efficient in your asp (not asp.net) code.

I have a wizard-type application that dips into the database with each page, I know there's a better way to do this out there, just pressed for time and can't think right now.

View Replies View Related

Database Calls Made

Is there a way I can see how many database calls were made from my script to the db server to check how well my SQL queries are formed?

I get the time taken to execute the queries, but in that time taken, I want to know how many calls were made to the DB server. Is it possible?

View Replies View Related

Database Calls, Server Transfers, Sessions, And Cookies

Any body know of a resource that compares/benchmarks the expense (in terms of milli seconds, or server load) of using various programing options?

I know a lot of articles and forum posts reccomend best practices between functions and programming options, but I would be interested in some type of definitive benchmark to decide between various prgramming options, depending on the need.

For example, I can call a Recordset and quickly write it into an array, so that the connection can be closed even before I write the data to the HTML page. This would save conection time and server resources, but I'd like to be able to judge the worth when considering coding it.

Every time I do a Server.Transfer how expensive is it to the server? How much am I loading the server with Session varaibles? If I store some info in a cookie, but have to call it, how long will that take? Am I using up server resources by creating large arrays?

View Replies View Related

Recursive Navigation

I have an SQL table structure full of main categories and subcategories as follows

ID (Primary key)
Title ( varchar)
Content ( varchar)
ParentID ( this will refer to the primary key of the main category records)

Hope I'm making sense anyway. Has anyone tackled this successfully?

View Replies View Related

Recursive Categories List

i am working on ecommerce site and would like to display the categories (and sub categories) from the db recursively,
i did it but i also want to add the level of each category like :
main_cat_1 (level 1)
--------sub_1 (level 1_1)
--------sub_2 (level 1_2)
------------sub_sub_2 (level 1_2_1)
------------sub_sub_2 (level 1_2_2)
------------sub_sub_2 (level 1_2_3)
--------sub_3 (level 1_3)
main_cat_2 (level 2)
main_cat_3 (level 3)
--------sub_3 (level 3_1)

and so on ... how can i do that ?

View Replies View Related

ASP Server Calls

I am using WindowsXP and a book to try to learn ASP.

The book instructed me to install IIS & .Net Framework v1.1 (which I did)

In the book they gave me the following code:

View Replies View Related

How To Use IIS To Redirect Http Calls?

I need to implement an application that receives http calls from a remote
client, do something with it and returns some feedback. I want to use IIS
(version 6) as my front end http server (with https and ssl services) which
will facilitate all the requirements of a http server and then foreword the
incoming call to my application and will return the process result to the
client at the end.

Does IIS support this? And if yes - what are the requirement from my application to use it (built in .net if anyone interested)?

View Replies View Related

Session Storage Vs. Frequent DB Calls

I'm developing web surveys where users logon to a web survey and answer up
to about 50 questions, one after the other, shown only one question at a
time. The answers are saved in a database.

A fellow developer and I are discussing when is the best time to save the
answers. We have two approaches in mind:

Approach 1:
After each question is answered, the answer is saved in the database.
Sessions are only used to store the User ID.

Approach 2:
After each question is answered, the answer is saved in a session variable.
When the user has finished the entire survey, all the answers are saved at
once in the database. Also, if the user logs out, or if the session times
out, the answers answered so far are all saved in the database at once.

The amount of actual data sent to the database is the same in both
approaches, but Approach 1 have much more frequent calls to the DB, thus
creating an overhead of opening and closing connections. I'm not sure how
significant that is. On the oter hand, Approach 2 store a lot of data in
sessions. I'm not sure how bad a thing that is.

Which approach is better and for what reasons? I'd be happy to supply more
information if needed.

View Replies View Related

Correlate ASP Page With Timings Of Its DB Calls

I am looking for a tool/product (commerical or shareware) to correlate
classic ASP pages (not ASP.NET) with timings of ADO calls made from
each ASP page. The information I am looking for are

T1, url = http://..../product.asp,
DB Server=SQLSvr1, DB Name=products
ADODB.Connection.Open 10ms
ADODB.Recordset.Open 189ms
...

T2, url = http://.../search.asp,
DB Server=SQLSvr2, DB Name=productindex
ADODB.Connection.Open 15ms
ADODB.Connection.Execute 350ms
...

It would be nice if the tool can automatically rewrite existing ASP
pages if necessary.

This would be a good performance monitoring tool for classic ASP
pages.

View Replies View Related

Multiple Calls With Inet Object Causes Site To Lock Up

I developed a website that posts data to another url via the Inet object.

I should mention that the posting code is wrapped in a VB 6 dll, and that
dll is called from ASP. Code:

View Replies View Related

Database Function Input

So far I've been using Sets to read information from the database (Set RS = Server.CreateObject("ADODB.RecordSet") and RS.Open queryString, Conn)

I've got a situation now where I have a function which returns just a single value. I call this function using "SELECT myFunction(parameters)". I can't use a result set to retrieve the function return value, can I? How should I do it?

View Replies View Related

Search Function W/out A Database?

I would like my ASP-based site to have a search box to bring up a list of relevant pages according to user-defined search criteria.

Q: Do I need to have a d/b like SQL Server 7 at the back end to process and match the search string? Or can I do w/out a d/b somehow and run a search, and somehow still bring up the same results?

If a d/b isn't necc, pls. advise on webpages where I can find such ASP-search codes.... TQ!!

View Replies View Related

Database Search Function

I have a page that uses the data from the previous pages form to search the data in the database and dispaly any matching results.

On doing so i get this error:

Error Type:
Microsoft VBScript compilation (0x800A03F9)
Expected 'Then'
/IT/searchresults.asp, line 20, column 15
If Request.Form"(Typesearch") = "computer_name" Then

My statement has a then in the statement already.

View Replies View Related

Nz() Function And JET Database Engine (0x80040E14)

I have beem recommended to use the Nz() function in the ORDER BY part of an
Access2000 stored query.

The query runs correcly from within Access2000
Yet when ran from ASP, it causes an error:

Microsoft JET Database Engine (0x80040E14)
Undefined function 'Nz' in expression.

Where should I define this function?

View Replies View Related

Problem With Open Database Function

I try to use as much functions as possible. So I have written a function to open a database and retreave the information from a specified field but it don't want to work.
This is the function I use Code:

View Replies View Related

Database Lookup In A Javascript Function *before* Displaying The Error

Is it possible to do a database lookup in a javascript function *before* displaying the error alert?

We want to do a database table lookup first and get a BETTER error message based on the text field throwing the error.

View Replies View Related

Difference Between Private Function And Public Function?

What's the difference between private and public functions in ASP? When should I use either?

View Replies View Related

How Can I Add Mail Function To That Post Function

I am using a simple guestbook /portal and i want script to send mail to the thread owner when someone reply his message.

this is the send message code ....

View Replies View Related

Function Inside A Function

Can I define a function inside a function. e.g;

function abc()
function xyz()
....some code.....
End Function
End Function

I googled this but can't find any related topic.

View Replies View Related

Function In The InStr Function

I want to use the instr function, but return results from it depending on surtain functions, I can't realy explain so I'll show my example:

I have a string in wich some word I want to find might be in diffrent Capital Letters order, I want the Instr function to return all the values of the place of that word (avcourse I'll run a for and increase the starting point of the Instr func until it returns 0). The instinct thought is to use the Lcase or the Ucase functions, but in this case I don't know how to use them. In the same Idea I wanted to use the Instr Func with the trim Func, But Its realy the same principle if I just understood how to do so.

View Replies View Related

Database Limit - Microsoft JET Database Engine Error '80040e14'

I have just started using ASP, I am normaly using PHP but I thought ASP might be a good road to go down. I am having a few problems, I am trying to limit the number of records I take out the database but I keep getting errors.

<%
'connection string
datapath=Server.Mappath("guest.mdb")
strconn="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & datapath & ";"
Set CONN = Server.CreateObject("ADODB.Connection")
CONN.Open strconn

'select all records row by row
DBquery="SELECT * FROM Guests LIMIT 10"
set query=Conn.execute(DBquery)
do while not query.eof

'get a variable from the table
guest_id = query("ID")
guest_name = query("Name")
guest_msg = query("Mesg")
guest_date = query("DateTime")

'print the variable to the screen
response.write guest_id & "<br />"
response.write guest_name & "<br />"
response.write guest_msg & "<br />"
response.write guest_date & "<br />"
response.write "<br />"
'move to the next record
set conn = nothing
query.movenext
loop
%>

I am getting this error;

Microsoft JET Database Engine error '80040e14'

Syntax error in FROM clause.

/guestbook/guest.asp, line 11

can anyone help me?

View Replies View Related

Microsoft JET Database Engine :: Cannot Update. Database Or Object Is Read-only

I had made a form name 'dform.html' which asks idno, name and phone from the user and after the user clicks on button "save data" sdata.asp is executed. sdata.asp is written to save the values entered for idno,name and phone in dform.html into table "myfriends" in the mydata.mdb (access database). but when i am clicking on save data button i am getting error saying

"Error Type:

Microsoft JET Database Engine (0x80040E09)
Cannot update. Database or object is read-only.
/SDATA.ASP, line 9"

can please anyone tell me why i am getting this error.

View Replies View Related

Database Connection String To MySQL-database On A Different Server

I work with ASP for several weeks now and i really like it! But until now i have just used it in connection with my localhost. I made connections to a SQL Database and to an ACESS Database with using the ODBC Tool from WIndows!!


Now i want to publish my website but i don't know how to handle the connection string kind of thing. My MySQL-Database is on a different server than the website and i need a connection string where i can type in the server, a password and a username and it should then connect.

View Replies View Related

How Do I Export Data Fom Local Database To Server Database?

I'm current working on a project which need to upload local data to
live server database.

Meanings that, i'm current having a server in my local mechine. I need
upload data from local database to live database which host at oversea
company. But i really have no idea how to do this in asp.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved