Recordset With Sub Table

have 2 tables that show boat information

Table 1 shows make model price etc
Table 2 shows the information for the images

I have joined the 2 tables as below

Select *
From tbl1, tbl2
Where tbl1.id = tbl2.id

Because there are more that one picture for some of the boats it displays each image as a seperate record

I just want it to show 1 image for each record

Is this possible??

View Replies


ADVERTISEMENT

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

Recordset/HTML Table

On the first ASP page I have a form (checkbox) with 20+ different categories. After the user clicks on a few of them, they all have to be transfered on the second ASP page in HTML table. My problem:

If user selects only three categories, they should represent themselves in three differenst columns in my html table(something like Column-Name). If he selects 4, - four differesnt columns in the same table, etc.

So the table has to be 'dynamic'. It should have the same number of categories that the user selected on the first page. Could it be done? After that I should populate every category from a recordset and I know now how to do that.

View Replies View Related

Multiple Table In Recordset

Basically I have the following SQL statement:

Quote: sqlConnect = "SELECT Users.User_ID, Users.Password, Users.Username, Event.Event_ID FROM Users LEFT JOIN Event ON Users.User_ID = Event.Admin_ID where Username = '" & Username & "'"
set rs= Server.CreateObject ("ADODB.Recordset")
rs.open sqlconnect, objconn, 3, 3
where username is an ASP variable of the username.

When I run this and I try to access a field from event I get an error i.e.

Quote: if rs("Event.Event_ID")<>")" then
session("admin")= rs("Event.Event_ID")
end if
Does anyone know what is wrong?!?!?! It doesn't seem to be able to pick up the fields from the event table?

View Replies View Related

Displaying A Recordset Dymanically In A Table

I am having a bit of trouble with classic asp and tables.

I want to loop through a recordset (easy enough) but I want to display the records in a table with only 3 records in a table row. So in other words each table row needs to have 3 items then a new table row is created dynamically until recordset.eof

Item 1 Item 2 Item 3
Item 4 Item 5.......until eof..

View Replies View Related

Create Recordset, Loop, Update Second Table

I am in the process of rewriting my table formats for an Access Project that was created. I now need to get the data from 1 table and transfer to a second table.

I created a page that creates the record set, I then loop through that record set and need to run an update statement to a second table, however, I get the following message:

Microsoft JET Database Engine (0x80004005)
Could not use ''; file already in use.
/BusPlanTest/updBusPlan.asp, line 17

Below is the code I am using: Code:

View Replies View Related

Return Recordset Of Images In Specific Cells In A Table

I have an interesting problem and am looking for some advice. I am
hoping to build an asp whereby records are pulled from SQL Server. These
records will be merely file locations for thumbnail images I hope to display
in a grid.

Rather than having a grid be constructed row-to-row, I was
wondering if it is at all possible to dynamically construct this grid as a
table of thumbnails whereby each cell (perhaps 5-6 columns across)
represents one record? I have no idea how one would construct this loop that
spans columns AND rows rather than just rows.

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

Error Type: ADODB.Recordset (0x800A0BADODB.Recordset (0x800A0BCD)

Last week, my shopping cart was still working well until I began getting the following errors 2days ago..

Error Type:

ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
../order/saveorder.asp, line 157

Browser Type:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)

Page:
GET /main/saveorder.asp

Could you check my code below and let me know what possibly the error is?

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

Recordset Controlled By Another Recordset Within A Loop

I have created a forum, in which I have 3 tables:

1: Table_Forum
2: Threads
3: Replies

I have it at the moment that on the main default.asp there is a recordset that will
display all records within that table, these are a list of forums that will be available.

I have a table that will show the forum name, and the description. This table is then looped using Do while not, now what i need to do is show how many records in the Treads table are related to each forum using asp. Code:

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

How To Make Column Of Table 1 = To Column Of Table 2?

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

Asp Table

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

SQL In Getting Table Name

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

Whole New Table

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

Get Table Row

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

Table

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

XML To Db Table

how to convert xml data to access table using asp.

View Replies View Related

Add Table Gridlines?

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

ASP Trying To Access SQL Table..

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

Table Not Updated

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

Cookies -vs- DB Table

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 Reloatins ?

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

Table Relationship

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

ASP Database Table

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

Table ID Is Invalid

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

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 View Related

Table Size

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







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