Updating Related Tables Via Webform
I have a MS Access database composed of a few related tables. I'm trying to link this with a website so that new data may be entered remotely via the website. I am using MS Frontpage, which has a simple wizard for this, but the wizard does not allow for updating multiple tables from the one web form. I have started learning ASP and VB, but all the books don't really discuss adding records to several related tables at one go. How do I do this?
Conceptually, I understand that you can't have a new record in the child table without a corresponding record in the parent record. It there a way of submitting several forms to the same record by 'indicating' which parent record each field is linked to? Is there a simple scripting code ? Any help or suggestion will be greatly appreciated, or just point me to where I might find the information I need?
View Replies
ADVERTISEMENT
I have an query that gets value from two tables lets say tb1 and tb2. First i m tryin to insert values into tb1 and based on those values i have to update some already existing values in tb2. it gives me following error:
Provider for ODBC Drivers error '80004005'
Cannot update. Database or object is read-only
i know my cursur types are correct as i can update without any error with a single table. This leads me to wonder if updating multiple tables in access is possible?
View Replies
View Related
I have one ASP page that has two separate FORMS, each that will update a separate SQL table. These tables are in the same DB with the same connection string for both.
The SQL statement seems to be writing correctly (when I test them) but neither of the tables updates when I try to update both of them. IF I try to update just ONE of the tables it does work correctly. Code:
View Replies
View Related
I have a really long webform that has hundreds of text fields, text boxes, labels, etc. I would like a button, that when clicked, will populate either a .doc, .pdf, .rtf, etc. file in a nice, printable format (perhaps from a template?) with a 'Save File' prompt displayed to the user.
I don't know how to do this, but I can get the data from either the webform itself, or from the SQL database (which is where I'm populating the webform anyway). Simply clicking FilePrint from IE is not acceptable because we need a document that we can distribute electronically. How can I populate one of these file types from a webform or database?
View Replies
View Related
As a trainer in a company, I launched a webform asking people to log
in before they can access the needed training. Nothing fancy and just
there for monitoring who comes in and when. Problem is that some
"nice-guys" enter who knows what - because that's fun. Can I
counteract this by having the ASP form sending me also the IP address
from the PC ? And where do I have to add these lines ? Code:
View Replies
View Related
I'm trying to do a registration page with CC information. I created my registration on an unsecure server and want to redirect the user to my secure server after they register so they can put in their CC info.
How can I make an interim page that says "Thanks for your registration, now redirecting you to secure page" What kind of function should I use to delay the redirection for 5 seconds or so. I'm running ASP.net with vb.net backend.
View Replies
View Related
I know how to create dynamic tables in dreamweaver to display fields and records in a table of a database, but in my case I need to create a dynamic table that lists all the tables in the database, then to click on the one i want 2 edit the data in there.
View Replies
View Related
i ve a problem thats regarding the data retrieval from database.I m storing data in the microsoft access database by writing query in the asp page..and the number of characters is exceeding 255.so the datatype that i ve chosen is memo...
but now when i want to retrieve the data on another page by writing query i cannot retrieve the whole data it is truncating and i can get only 255 characters
View Replies
View Related
i have a table with sno, userid, name, age, level
where level means the type of grade a person has like A,B it may even be Numbers on a scale of 1 to 5
the sno is declared as a rowid datatype
if i want to update any record i have to give the existing userid ( primary key ) and even update the primary key if there are no duplicates (obviously)
so when the userid is entered i am selecting the rowid where userid = request("")
and storing that rowid value in a variable to perform update operation in the next few steps
i am getting a type mismatch when i am doing the assignment
is there somethin wrong in the code ( that i need to check again ) or that sort of assignment cant be done
( i am still tryin to get it right as i write this thread )
i have one more ques: does the rowid value remain constant that is when i do a delete operation on one row and then subsequently a update operation on another row in the same table will the rowid's get mixed up and mess up my data.
View Replies
View Related
Is there a way to perform multiple actions on a SUBMIT with ASP?
Example, I have a submit button that when it is pressed, it performs an action where information is stored in the database using a stored procedure. Can I also write out a flat file of the information saved separately or something parallel without hendering the original submit? I would want to do these two requests at the same time on the submit. Is it possible? Can someone give me some guidance on this?
View Replies
View Related
I am making request to my asp page as
http://localhost/test/test.asp?id=mike
this works great query string value is retrived as "mike"
whereas when I give the URL like this
http://localhost/test/test.asp?id=%aaa
I dont get id value = %aaa
instead I get some garbage value...
is there some kind of encoding required when % is involved in querystring...
View Replies
View Related
currently i have an online shopping website that display 12 categories of different items of up to 12 types. well my boss wants related items to be displayed in each of the different items . i am not sure how to start this. is there any special code for it. please advise.you may visit www.mellon.com.sg/shop to view .
View Replies
View Related
I have 2 web sites hosted on 2 different machies (pages are in classic asp). when the user accesses http://Machine1/testapp then a cookie is written say
Response.Cookies("user")="Alex"
Whe the user acceses http://Machine2/testapp then a cookie is written as
Response.Cookies("user")="Alex"
before machine2 writes a cookie I need to check if the browser already hase Machine1 cookie, if yes then dont write if no then only write. I know the different hostnames generate different cookies....but is there any way for machine2 code to check client browser cookie for machine1.
View Replies
View Related
This is the code I have so far:
I take the email address and split at the "@" symbol. Then I split at the "." sign to get the firstname and lastname.
Most of the times, the email address is of the format:
FirstName.LastName@company.com
However at times, the email address can be just firstname@company.com
At such instances the code fails, how do I check for the instance of . before I split it again?
View Replies
View Related
Access db, one table, 12 or so fields (id, item_name, category, manufacture, price, description etc.)... (ecomm site).
When displaying the details of a particular item I want to display "related items" below it. All I do now is pull info depending on the item id then display the size, dimensions, description, photo etc.
Lets say the item is a Large Blue Widget, i want to display related items... say "Large Widget Covers" or/and "Large Widget Accessories"... you get the idea... cross selling
So, I am looking for ideas on how to simplify the display of related items.
View Replies
View Related
I am designing a Web site with about 500 - 600 pages of festivals on it and would like opinions on two ASP subjects. I have designed about 20 pages or so as of now. These are the contact us, FAQ, about us pages and such. I also have a template to go by for each festival's page. But I have two problems I need fixed before I start to replicate.
(1) SSI and styles - There are four sections to each page. I use SSI (ASP virtual version) for the top, bottom and a small section of featured festivals (which is above the bottom) on each page. Between the top and featured festivals is the actual page. This way I can change a link on the top or bottom and it is fixed on all pages.
But, I have an enormous amount of styles listed (all styles on four pages) in the code from each page's fonts. Each page's styles are called something different. For example, the festival page itself has the styles as normal, ".style1." But the styles on the top the links, which once again is an ASP include, would be called ".style1top." I used that approach because .style1 on the festival page and top links could be different.
It works, but I have dirty code and I want the site to be as Google friendly as possible. I have thought about adding all the styles to a page and using it as an ASP include on all pages, but that would have way too many styles each page and be even dirtier. What is the best practice for this? Code:
View Replies
View Related
I have a database related problem:
Syntax error (missing operator) in query expression ''087,'1075654'
This is a mobile number I entered in a form. 087 is the cusMobilePrefix,
1075654 is the cusMobileNumber
why is there a double quotation mark at the beginning of the number and none at the end?
I dont get it. If i leave the ' in i get a data type error and if i leave them out i get the above error. Below is my ASP file: Code:
View Replies
View Related
When adding i am checking if that name already exists in the DB and if so i am poping up the message that name already existing.
It is working perfectly in my win2000prof and i have tested in both in my localhost and ftp servers and in both places it is working as i ahve expected.
But when the same application is opened in winxp i have a strange problem coming. When i add a new list , then it checks for the name and what happens is every time i add a new one and even if there is no matching record or matching name avialable for that record, javascript popups saying "Favourite List Name Already Exists" and the strangest part is the insert part also working. That is both if and else part are working together. I am getting this problem only in XP. Code:
View Replies
View Related
Do you think it's posible to DISABLE a checkbox and the value associated with it, based on the DATE apearing in one of the columns in my database? Example,
I will loop through a list of series of products from my database, and I will put an automatic checkbox infront of any row in my form. I want ASP to automaticly disable the checkbox (can't be clicked on) if the date associated with it is older than 3 years.
View Replies
View Related
I have a page(.inc file) that contains connection to db; how can I make this page inaccessible to public.
View Replies
View Related
while using <form method=GET> whats the max length we can send in the input fields?
i heard that max querystring length is 2048 characters.while using forum with POST method its nearly one lakh characters.since GET method is treated as querystring, does it restricts the huge data?
View Replies
View Related
var oldLen = objListAppAnalysis.options.length;
alert(oldLen);
var i;
for (i=0;i<oldLen;i++)
{
objListAppAnalysis.options.remove[i];
}
var newlen = objListAppAnalysis.options.length;
alert(newlen).
View Replies
View Related
I have two list item one for country nd other for cities
how can I change cities list item value crosponding to the country list item value changes ??
View Replies
View Related
I have a timesheet application I'm working on. The user fills in a form which sends data to an Access db. On the results page I need to display the values from 2 fields; i.e if the user selects "Report Writing" from a drop down list, I need the data contained in another column called 'Codes' to display as well.
View Replies
View Related
What i'm looking for is an asp function which automatically runs every day at e.g. 12:00 AM and then updates a database. So no user or external event is involved to trigger the function. It operates stand alone. Hope there are some code examples available.
View Replies
View Related
Is this a "legal" assignment in VBScript? strSearchChar5 = "&"
Once I do this in script tags, it throws the rest of my page off, as far as the colors in Dreamweaver. Would the lack of colors mean anything?
The code that uses this variable works beautifully, yet when I use request.form on the following page, nothing shows when I use Response.Write.
This is what shows when I use Response.Write:
UPDATE jobs SET [SubmitDate]='',[category]='',[type]=''' ,[job_title]='',[job_number]='',[openings]=' ',[address]=' ',[city]=' ',[zip]=' '
View Replies
View Related
We are working on an old asp project and we noticed that some users get
kicked out of the session right after they log in.
I investigated the issue and I found the cause:
1- The user login successfuly.
2- He gets redirected to the menu screen. that's when I set some
cookies to cookie("cookie name").expires = Now. that when the session
starts to disapear, once the user tries to access other pages (or even
refresh), the ASPSESSIONID cookie disapears.
I did some debugging on the http_cookie collection and looks like the
ASPSESSION disapears once I set the cookie expiration, although I set
the expiration for cookies unrelated to the ASPSESSIONID.
Here is the tricky thing, it works on 90% of the machines, and it
doesn't on other machines, it's also random, so some users who had the
problem, are now able to work on the system and the problem disapeard.
Have you guys ever had this problem, or do you know if it is related to
IE batches or service packs?
View Replies
View Related
I need to be able to have a drop down box wih several options, and what option you choose depends on what the next drop down ox has.
For example, a drop down box with countries: England, Wales, Scotland.
If you select England, you get the box below it saying Liverpool, Manchester.
View Replies
View Related
I am relatively new to ASP but am fairly familiar with PHP and ASP.NET and JavaScript.
My problem is this:
I have a drop down box which is populated from the database (Access), it sets the value to the ID of a hospital ward, and the text to the name of the ward.
I then use the ID to look up an email address for the manager of the ward from another table in the database. My un-optimised code is as follows: Code:
View Replies
View Related
I'm getting this error message: Error Type:
Microsoft JET Database Engine (0x80004005)
You cannot add or change a record because a related record is required in table 'employees'. Code:
View Replies
View Related
Well, my script consists in check if the typed code doesn't exist in the DATABASE, but thats not the problem... the problem is that the PAGE1.ASP (that check the code) redirects to the ADD.ASP that will add those codes to the database!
Response.Redirect("add.asp?cod_1=" + cod_1 + "&cod_2=" + cod_2 + "&cod_3=" + cod_3 + "&cod_4=" + cod_4 + "&cod_5=" + cod_5 + "&sexo1=" + sexo1 + "&sexo2=" + sexo2 + "&sexo3=" + sexo3 + "&sexo4=" + sexo4 + "&sexo5=" + sexo5)
That's the line in page1.asp that redirects to the add.asp. So, when the database is completed empty and, the page1.asp checks that there ins't any problem with it and redirect to the add.asp that doesn't update my database!! So, it continues without any record. But, if the database has, at least, one record, the script works normally without any problem!
Another thing that I noticed is that when I, manually, type the adress Http://127.0.0.1/add.asp?cod_1=176096, for example, and the the database is empty, the script does the UPDATE and adds the code to the table!
I have no idea that the problem is. Does any one have a clue?
The goes the add.asp script: ....
View Replies
View Related
I'm not sure if this is an ASP thing, a IIS thing, or a GoDaddy (where my domain is registerd and forwarded from) thing...
First I'll start by saying I run my own Windows XP web server and do all the coding myself..
I've noticed in the past (and never really gave it much thought, because the site works fine), that when I switch pages within my site, that the URL line is not always updated.
For example, I go into the pictures section, view a few pictures, then select the "Home" tab... The URL will stay with the variables that were passed when I was viewing the pictures. Therefore, if I do a "refresh", the page goes back to the pictures I was previously looking at, not the home page.
I've tried this on multiple computers at multiple sites, and with multiple browsers... And seems to happen rather consistantly...
Anyone have any thoughts?
View Replies
View Related
I am looking at updating a notes part of my data base. I am calling two fields (first name and last) from the data base and putting them into read only text box (as i dont want the details changing). All of this is contained within a form. I am also calling a feild from the database called notes which originally has been inserted using a <textarea> tag. The problem i face is that you cant put values into a <textarea> (ie. i can put data from the database into the value tag of a textbox but <textarea> doesn't have a value tag). Due to this i am putting existing notes onto the page as text. Under this i have do have a <textarea> to put the new notes in.
The problem i have is that i some how need to store the existing data in the notes field and then add it to the new notes that i will be adding. I just don't know how to put the data i am getting from the notes field in the database into a variable.
View Replies
View Related