Adding A Relational Table

I have a database which contains 2 tables. One which contains standard information (which every record has) and then the other, which is a relational table and is just a long list of records with different attributes that apply to various id numbers found in the first table. Both tables are contain records with the same ID number.

Now, I have an ASP file that accesses the MDB file and displays it in XML format. I have it working for only the first table. However, I was wondering how I would go about getting entries from the second table entered.

So it would display the items from the first table on 1 line - and then add on anything from the 2nd table that applies to that ID - all on one line. Code:

View Replies


ADVERTISEMENT

Adding Data To A Table

Is it better to use the Recordset methods or make an SQL query string and use conn.Execute() if I want to add to a table? I figure the first might be safer, but it seems weird to someone who learnt on PHP... I'm using SQL Server if that matters.

View Replies View Related

Problem With Adding Records To A Table

There is something wrong with the adding code. It will add sometimes. It's a large database where I have to add records to multiple tables.

The products table doesn't work correctly. Maybe there's a typo somewhere that I don't notice. Please look at the bolded part of my code and see if you can catch something. Code:

View Replies View Related

Problem With Adding Array To Database Table

I have an array which I want to save into a database table I tried a few things but it doesn't work. This is as far as I got: Code:

View Replies View Related

Adding Rows To Database Table Thro ASP

I want to add a row to library table. Table has total 7 fields. But I
want to create the new row with 5 field data. When I run the following query
in MS Access

strQ = "INSERT into library (index,title,author,itemtype,createdate) VALUES
('B-096','Hihihihihi','hello','Book','07/18/04')"

It successfully adds the row. But same thing I am trying with the following
ASP code. It gives error, saying syntax error in INSERT into statement. Code:

View Replies View Related

ASP And Relational Databases

What i need to do is build 2 tables below with the following fields:

tblUsers
id
name
address
postcode

tblShop
id
product

Now i need to build a relation between the two id fields but what i relaly need to know is how to retreve the data in the tblUsers from the id in the tblShop through asp. This is like for a shop

View Replies View Related

Relational Database Fields

Is their a way to check with asp-code if a database field is relational with another field (from another table)?
For example:
If fieldname = relational Then...
End If

View Replies View Related

Designing Relational Databases

I have an interview for job which requires following:
1.Modeling and Designing Relational Databases
2.Database applications for the web
3.Server side Programming using PHP
4.Macromedia Flash and Dynamic Data
5.Internet and Web Protocols
6.Installing Apache Web Server, PHP and MySQL
7.Authentication and Security
8.Integrating Streaming media into web development
9.Understanding Mobile Communications
can anyone pls suggest me what Dynamic Data in point 4 means?Also what is Integrating Streaming Media of point 8?and when it says mobile communication.

View Replies View Related

Multi-Relational Database

I have a table (Software Table) in a database that is linked with a many to one relation to another table (Computer Table). I wrote a simple ASP page to return the records for the software table which shares a one to many realtion with the Computer Table.

One (Software Table) to Many (Computer Table)

At persent the only records that are returned are the ones from the software table. Is there some way to return or display the many computers (one to many) for each record.I cant think how to start to do this. Can I link to computer table and have a drop down that lists the many computers?a better way to display this information?

View Replies View Related

Connecting Relational Database

i have been thru a couple of books on ASP working with IIS 5.0 but still havent figured out how to connect to a MS Access database. the problem is with the SQL which i dont know well. My database has 6 related tables.

It's for inventory control. The 1st table has the catagort the 2nd has the machines per category, the 3rd has machine parts per machine and so on. what I have been trying to do is to view the database for the latest updates per machine (which for now i am updating manually for the time being ) but the code dosent work and i get some errors one of which is " use an updateable qurrey" and others are related to SQl with every modification i make.

View Replies View Related

How To Transfer Records From One Table Of A Database To Another Table In Another Data

I have aproblem to transfer a data from table x to table y based on id. Its mean when 2 table have same id all data table x must move to table y. I don't know which command need to use is it insert into or update?

<%
Dim conn
Dim rs
Dim MYSQL,MYSQL2

Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
Set cmd = Server.CreateObject("ADODB.Recordset")
conn.ConnectionString = "DSN=prmm;UID=administrator;pwd=sa"
conn.Open

startdate=request("tarikh1")
enddate=request("tarikh2")

MYSQL = "SELECT * FROM table_x where paymentdate between '" & tarikh1 & "' and '" & tarikh2 & "'"
rs.open MYSQL,conn ....

View Replies View Related

How To Open A Recordset For A Table Has Space In The Table NAME?

I am trying to display the content of a Table called

'Order Detail' directly from the database (e.g., Northwind.mdb). I have the following commands:

Set tableSet = Server.CreateObject("ADODB.Recordset")

tableSet.Open table_name, DB_name, adOpenForwardOnly, _
adLockOptimistic, adCmdTable

where, table_name = ''Order Detail" Or
table_name = 'Order Detail' Or different variations.

I always get error on the second command with the following message:
Syntax error in query. Incomplete query clause

which I believe because of space in the Table Name. How can I resolve this issue? (working with file or table name with space)?

View Replies View Related

Table Inside A Table Update To DB

I have a table with many txt boxes which i have inside a form with a submit button to an update page which adds all the details to a db. The problem is i have a another table inside the first e.g. table 2. i want to be able to update table2 by clicking a second submit button that would update it. Is it possible to have a form within a form or how can i do it??

Also i need to update the entire table in one go. For exampple if i have 3 records in table2 i want to be able to update them all by clicking the one update button. Code:

View Replies View Related

Copying From Table 1 Inserting In Table 2

I have the following code but this is inserting manually. I want to make a query from table 1 and automatically enter the records into table 2. What needs to be modified? Code:

View Replies View Related

Bookmarking A Position In A Table <table>

Have an app which dynamically creates table rows depending on records, these can be several hundred (don't ask). Hence a very long page at time. Each row includes a hyper link to a new page, and a link back to the original page.

Is there any method (maybe via js) where on leaving the second page l can redirect the browser to the table row the end user clicked on? Hence the bookmarking. Can do this via Visual Basic on the desktop app, but can't work it out on the web app.

View Replies View Related

How To Get Data From A Table Into A Table Form?

I have a table produced with names across the top and services down the left hand side with boxes for numbers for people who recieve services then the info is written into a table in an access db. That works fine and here is that code:

View Replies View Related

Best Method Of Updating Table From 2nd Table

I have two tables. Table A has 20,000 records, Table B has 2,000 records. Table A is what needs to be updated from the data in Table B. Only some fields will be updated and of course, only some records - both tables have the same field as a ClientID so matching up records should be easy.

Anyways, been a while since I have used ASP to work on things like this but would like to work through this one. I understand the process I believe, it is just how to make it go on to the next record once it has finished updating the first.

Basically, I was thinking of having it set up to reaad the top record from Table B, update applicable data in Table A. Delete that record in Table B. Move on to the next.

View Replies View Related

Record Set For Id From Table 1 To Table 2

Hello I have a page for registering users.

I am reciveing this error:

The following errors occured:
- An error occured. -2147217904 : No value given for one or more required parameters.

there are students and teachers. therefore I have 3 tables one for logins and one for staff and on for students.

I have a form designed to capeture the need information.

in the code I am runing an if and elseif statmetn to determin the tables. I then insert the userid and password into the login table.

then i enter the remaining information into ither the staff or student table. what i am trying to do is select the perimary number that is generated as the userid and passeword are enterd. and add this to the second table. Code:

View Replies View Related

Adding Bcc

I have a form on my asp page that sends data to an emailing script. I am working with other peoples code which is causing a lot of hassle. Is there any way of sending a Bcc address command from the form rather than the emailing script?

View Replies View Related

Adding

I wanted to know how I should go about doing this. I have this query:

SQLmax="SELECT Max(OrderNumber) AS intTotal FROM Status"

Which gives the Max(OrderNumber).Say in this case it is giving out put as 37.

Now i want the output to be displayed 38,which can be done by adding 1 to Max(OrderNumber).

Should i get this by doing this way?

var=RS(intTotal)
var=var+1
Response.WRite var

Is this right?

View Replies View Related

Adding Second Value

Im using this code to pass a value to a variable:

<a href="Artists.asp?cat=<%=Server.URLEncode( rsuser( "art_Artist" ) )%>">&nbsp;<%=rsuser( "art_Artist" )%></a>

How do I add another value to this link with the variable name catArt so that I can add:

?catArt=<%=Server.URLEncode( rsuser( "art_Artist" ) )%>

View Replies View Related

Adding New Row

what do you think is the best way to implement an "add new row to table" functionalilty?
am using asp(obviously )im currently using document.createElement with javascript, but im having a hard time retrieving the data.am also thinking if this is really the best way to do this.or if this would work with all other browsers other than IE...

View Replies View Related

Adding Pwd

how to add a password to using this connection string

<%
set conn = server.createobject ("ADODB.connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("dat48372.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
SQL = "SELECT Price FROM DABRadios WHERE (ID LIKE 6)"
rs.Open SQL, conn
showall=true
%>

View Replies View Related

Adding In Asp 3.0

i have a id1 field which has data like this 002,003,004 and i have to increment it by one when i add a new customer so this is what i do

Set rs1 = Server.CreateObject("ADODB.Recordset")
sql1="Select Max(id1) from table2"
rs1.Open sql1, Conn ,2,2

maxid=rs1(0)

so i get the maxid for example as 003. the next record will be added and it should be 004 and i do it in this way maxid= maxid+1

but when the record is added the id1 field has a value of 4 instead of 004

View Replies View Related

Adding Different Fields

Say I have to different recordsets that have the fields:
rsA.Fields.Item("A").Value ,rsB.Fields.Item("B").Value

How would I add those to fields? It may be my inexperience but when I
tried something like

rsA.Fields.Item("A").Value + rsB.Fields.Item("B").Value

didnt work because one of the fields was a empty value. I have about
6 fields i need to add together if a value exists in any of them.

Suggestions?

View Replies View Related

Adding Data On Its Own!

I want to fix this problem, i dont no how. Bassicly there is blank data appearing in my database, for no apparant reason! Code:

View Replies View Related

Adding New User

How can I add a new user on my server using ASP?
User example: myserver/user1

View Replies View Related

Adding Pictures

I'm new to ASP and a few querys

I have created my database in Access with the following fields

StockCode (Text Box, Primary Key)
Item (Memo)
Price (currency)
Picture (memo)
OnOffer (Yes/No)

and I know that access table cannot have a picture in it, only a access
form using OLE, but how do I get my asp page to display a picture for
every record? The picture would be a picture of the product with the
Stockcode as the filename - m001110.jpg?

View Replies View Related

Adding Form

I have an ASP page with a table that fills with records from a loop. Every
row gets a link to another ASP page with data from the row. The link is
written as <a href=newpage.asp?value1=xx&value2=yy .... and so on.
Now I try to let the user specify a number that should be sent to the other
page. But I do not want to clutter up every row with each an input field,
so I thought instead I would place it above all the data rows. When the user
clicks on the link, I want to include the input field to the querysting. The
problem here is that I cannot figure out how to refer to the name of the
input field.

View Replies View Related

Adding Size

I have just finished building my first shopping cart in asp and MS Access. Originally the shopping cart was to be built for products with no size and colour, however as usual the goal posts have moved and I now need to incorporate a size and colour option for each product. Could anyone explain to me how I can go about doing this i.e. adding the different sizes and colours in the admin website and then linking them to a specific product when it is displayed on the products page? I know they both need to be in a dynamic drop down box when displayed on the products page within the shopping cart, but I am just wondering how to read the correct values out from the table depending on which product is being displayed. I have a normal products table at the moment with general fields i.e ID, name, description etc.

View Replies View Related

Adding Header

I have a web page hosted by server1. I need to add a link to a web page hosted by server2. This part is simple. However, I also need to give the linked web page the user id for the user that was validated in server1 (it's in a session variable).

At first, I thought the following would work:
mywebpageonserver1.asp:
Response.AddHeader "MYUSERID", "whatever"
Response.Redirect "http://server2/mywebpageonserver2.asp"

On server2, mywebpageonserver2.asp:

View Replies View Related

Adding Up Values

i have a page that enters numbers stored in different values e.g monday tuesday wednesday thursday friday into a database. is it possible in asp to add those values up and store the added up value in a seperate field in the database
bascially
total =monday+tuesday+wednesday+thursday+friday
How would i do that in asp.

View Replies View Related

Adding Recordset Value

I am using Dreamweaver MX to create ASP and MS SQL Server for database. I got a few fields like Value1 - Value5. So i have create the recordset of the 5 fields and i am extracting the total count of each field. Now i got 5 recordsets showing the total of each field. So is it possible to add the value of the 5 recordset together into one value? And is it possible to use the value of the recordset to do some simple math addition, subtraction, multiplication and division?

View Replies View Related







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