Table Relationships
how to use related tables in a database, how to retrieve data and how to insert data.
I have one MS access database with two tables. One table contains info about authors and the other contains articles. The relationship between the tables is many to many, that is one article can have many authors and one author can have many articles.
I plan on having a web form where I have the articles written and through the form I need to submit what authors ar related to that article.
What I need help with is how I use the form to connect authors and articles in the database and also how to retrieve the same information to publish on my site using ASP.
View Replies
ADVERTISEMENT
Im having trouble with the relationships for my access db, which i will be using for asp. Ive gone through many tutorials, yet they all keep their db quite simple. I find mine quite complex, so its hard to adapt to them.
Im just wondering if im on the right track or not, cause I have a feeling its completely wrong. The database is used as follows:
The database is use for a training module, users access the training module, and the content is derived from db. There are topics, subtopics, and an assessment area, which is used to test users on their knowledge.
View Replies
View Related
I'm trying to build a sort of datagrid control by which i wish to
edit/delete/update data in a table.
Since I'm using foreign-keys for normalizing data in the db I need, when I
add or update data, to display those foreign-keys ID in a user-friendly
manner such as a combobox with values = FK and visible text = Value of the
description field in the related table. Is it enough clear 'till this point?
So I need to detect if a field in a table is related to another field in
another table (i seldom use self-joins, so maybe that would be a limit of my
control but I don't care about that).
Do I have to refer to the Recordset's object OpenSchema method or there's a
better/simpler way to do it?
OT P.S (Off-topic post scriptum.Do you have any suggestions or
advices on companies that work with MS technologies and might be interested
in an ASP/MS Access (included all MS Access non database specific stuff such
as Forms, VBA, Reports) developer with 2 years experience.
View Replies
View Related
Is it possible to access the relationship information from an ASP program? I'd like to be able to traverse the relationship tree of a .mdb file on my server from ASP/javascript code.
View Replies
View Related
When building an Access db to be accessed by ASP, do I need to worry
about setting the Relationships between the tables and the Join Types
(one to many ,etc.), or can I just rely on declaring the relationships
in my SQL statements?
How about the setting for Referential Integrity. Should I ever have to
worry about having Access enforce those, including update and deleted
related records?
I have never bothered with setting the relationships in the couple of
simple databases I've built for ASP. But I always wonder if I should
do that.
View Replies
View Related
Is it possible to access the relationship information from an ASP program? I'd like to be able to traverse the relationship tree of a .mdb file on my server from ASP/javascript code.
View Replies
View Related
can i do this :
rs.Open "SELECT * FROM files WHERE uid ="& getuid , Connect, 2, 3
Even that uid is not a field on files, it is a field on another table related to files..Called Shares.
View Replies
View Related
I have a cross-reference table already set up that contains the information about programs that run in our database. It contains the program name, the tables used as inputs and the tables used as outputs. There is a row for each input to a program and a row for each output from a program. Code:
View Replies
View Related
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
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
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
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
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
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
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
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
I want MS Access 2000 database column of table 1 = column of table 2. This is what I was doing: Code:
View Replies
View Related
I have a database app that I'm building and displaying my results in a table.
I need to know for anyone who can help how to have one row say red and the next row say green for instance.
View Replies
View Related
I have menubox that shows all the datbases in a directory. When the user highlights a database, the chosen value gets stored in an Application variable(its a control panel).
Id like this Application variable to populate another menubox with a listing of all the tables within the selected database. However, I'm having trouble getting these values and google hasn't been much help. Code:
View Replies
View Related
Can i, using asp code, create whole new table in my DB?
I have clients on my site and each client buys itmes and i want to store the purchase list.so i thought that each client has its own table like member "John" has "JohnOrders" a table reserved only for him..
Which means i need to create a table using code each time a user register.
am i doing this right beacuse i've seen people have just one "ORDERS" table but i cant understand how the stuff all the info about all users into 1 table?
View Replies
View Related
how can i get the table row index so that i can highlight the entire row when the user click on the row.Below is teh code i have tried but failed... cos it only hightlight a single cell.
var oSelected = null;
if (oSelected != null)
{
oSelected.bgColor = "white";
}
oSelected = window.event.srcElement;
oSelected.bgColor = "lightskyblue";
View Replies
View Related
i want to create a table from a txt file seleted by the user and display on the browser. anyone can offer some tips on ow to do it?
View Replies
View Related
how to convert xml data to access table using asp.
View Replies
View Related
How can I add table gridlines to this? border of 1 inch?
<%
call OpenDB()
set rs = Dbconn.Execute("EXEC spRES")
Response.Write "<table>"
Response.Write "<tr>"
For Each oField In rs.Fields
Response.Write "<th>" & oField.Name & "</th>"
Next
Response.Write "</tr>"
Do Until rs.EOF
Response.Write "<tr>"
For Each oField In rs.Fields
Response.Write "<td>" & oField.Value & "</td>"
Next
Response.Write "</tr>"
rs.MoveNext
Loop
Response.Write "</table>"
%>
View Replies
View Related
Trying to access an SQL Table....
'ATTACHMENT'
I have a form that is set up to search the table and attached is the code that is trying to get data from that table.
Need help please, if anyone has any ideas.
This is the error Im getting:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '2003'.
/pub/property/tpp/SearchRes.asp, line 124
I cant figure it out.
View Replies
View Related
I am using an Insert command in my asp code that Inserts a rows in my database. After the Insert command i create a recordset and ask for all the rows in the table that i aplied the insert command Some times the rows i get are correct but sometimes the database is not updated by the time the recordset is opened.
Is there any way to wait until the table is updated with the new rows and then open the
recordset? ...
View Replies
View Related
On an Intranet Web application I'm working on, I need to
display a Pop-up that shows the users what report changes
have occurred. This may happen once a week or more and I
need a way for the users to turn-off this Pop-up after
they've reviewed the changes.
Currently, I'm debating whether to use cookies or build a
table that will set flags. I'm not sure what the best
solution to take would be. Does anyone know what would be
the best solution? I don't like the idea of using Pop-
ups. I'd rather have a link for the user to click that
shows the report changes, but my client wants to use pop-
ups.
If I use cookies, how do I create one, and how do I update
it so it knows when to and when not to display a pop-up?
I've never created a cookie before, so if someone has some
sample code that would helpful.
As for the Pop-up, I've seen pop-ups that loads a new
instance of IE, and I've seen pop-ups that look embedded
in the current instance of IE with a close option. I
would like to create the latter pop-up? Has anyone done a
pop-up like the embedded one before? If so, where can I
find some sample code on how to create one?
View Replies
View Related
what is table relations?
what is its advantages?
how to use in asp?
how does it effect to perfromance?
should we use it?
if i use it, can i get records of two tables in a only recordset..
View Replies
View Related
If there is three table,
let say A,B and C
C store the B id, and B store the A id
now what i trying to do is search from C table to get result in A
and display the result from A table..
hv any idea?
View Replies
View Related
I want to make an asp table for my database. I have two tables, one with peoples details and the other with their orders. I have done a one to many relationship between these.
What i would like to be able to do is a heading with the customer details, and under that all of what that person has ordered. Then another heading with a different customer and so on..
View Replies
View Related
I'm trying to create a table in a new Access database, but the line in the code that says
catDB.Tables.Append tblNew
provokes this error:
Microsoft JET Database Engine error '80040e3c'
Table ID is invalid.
Could this be a permissions problem? It's a brand-new hosting account, brand-new directories, etc. The DDL code that created the database ran successfully, but now I can't create a table in that database.
View Replies
View Related
I have these two tables in a SQL database. i.e. tbl_A and tbl_B
I need to create an ASP page that will tell me the size of each table and then the combined size of both tables.How do I accomplish this?
View Replies
View Related
How can i check if my table is already exist in the database?
View Replies
View Related