I know how to alternate table row bgcolor by odd/even method but what I am trying to acheive is alternate colors by the date value in the database so that each row with the same date value has the same bgcolor. There maybe 3 red rows for 1st date, then 2 blue rows for 2nd date, then 6 red rows for next date etc.
I have an ASP VBScript page with a dynamic table. Each row contains a dynamic price, a qty field, and a total. The total on each row changes (onChange() ) when a qty is entered (this works fine). I now need to total up the 'total' fields and put a 'GrandTotal' into a variable for later
I'm wondering if it's possible to write recordsets into HTML table cells, say, 3 columns wide using a loop? I've tried it but obviously I need to get 3 records out at a time so I can't detect the end of file. Any ideas?
I'm trying to update several rows to the same table of a datbase using ASP & an access database.
But I can't seem to get it working. I can get it working for one row but more than that won't work. The amount of rows that need to updated is never the same.
I'm sure it sounds kinda nutty to display 200 columns and 500,000 rows of data. But I have been pulling data from a Lotus Notes database into Sql Server for a while now, but Lotus Notes is starting to crack, columns getting corrupted. Can't handle the volume of data and number of columns. Sql Server has no problem. But displaying the data is the big deal. The end users want to be able to scroll acros a page to the colum of their choice, or be able to scroll up or down.
I was thinking of breaking up the table into section, but this would reqire additional clicking to get to the next section of the table. Would it be feasable to have a 200 column table in asp? or should I stick with the section idea? I have to tell my dept something. They started out with Lotus Notes but couldn't query the data. I have been suggesting to migrate the project entirely to Sql Server/IIS. Notes can at least display all the columns.
I am creating a table with two rows(one of which is the header), and 8 column headings. In the 2nd row, i am trying to apply 3 different colours that span various length across the row. I want the row to loop adding one colour directly to the end of another, but adding this to the correct length of colspan for each colour.
The code below is what i have done so far, but i only get a blue colour in the 3rds cell. Eventually i would like to have a variable length of row, as i do not yet know how many rows i need (this will be dependant on something else). But i would like the colour method to be applied to each row.
Also i need to be able to make colspan variable so after each loop, it will be updated by the new column amount ....
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:
Im running a select statement to a database and wish to display the relevant records into a table. For some reason, its not liking this - can someone see why, and or tell me an easier way to produce an 'automatically generating' table of results.
<body bgcolor="#FFFFFF" text="#000000"> <!-- #include file="dbConn.asp" --> <!-- #include file="adovbs.inc"--> <h1>Your search results returned the following popup messages:</h1> <% Dim msgtype, title, message, url msgtype=request.form("type") title=request.form("title") message=request.form("msg") url=request.form("URL")
Dim adoDB, adors, strSQL set adoDB = Server.CreateObject("ADODB.Connection") adoDB.Open strConnection set adoRS = Server.CreateObject("ADODB.RecordSet") strSQL="SELECT PID,P_TITLE,P_MSG,P_URL,P_TYPE FROM POPUP WHERE (" If msgtype <> "" then strSQL=strSQL & "P_TYPE='" & msgtype & "' " If title <> "" then strSQL=strSQL & "OR P_TITLE LIKE '%" & title & "%' " If message <> "" then strSQL=strSQL & "OR P_MSG LIKE '%" & message & "%' " If url <> "" then strSQL=strSQL & "OR P_URL LIKE '%" & url & "%' " End if strSQL=strSQL & ")"
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
My idea is to have a web form that a user can add extra fields if needed. Example would be a form that a user would add ComputerName, IP, and at least one row of data say Application, Vendor, Contact. Then they need to add two more rows of the same data (App,Ven,Cont). So I guess some sort of dynamically adding more fields for more data entry. The point being you don't have an idea how may there really are to add. Then on the database side I would guess one table to hold the IdentNumber,ComputerName, IP and another table for the IdentNumber, App,Ven,Cont.
I have a database used by another application, i want to be able to manipulate the data stored in the database, the problem is that the way the information is stored its awkward(assume this is purposely so), but i cannot change the db structure at all, so heres my problem: Each Person in this database will have multiple comments stored against them:
ID | CommentCode | LineNum | ValueData 1234 COMM1 1 Something about thi 1234 COMM1 2 s person seperated ov 1234 COMM1 3 er multiple lines 1234 COMM2 1 Something else about 1234 COMM2 2 them
What i want to do is circle through the recordset and combine the multiple lines of the same comment, any ideas/examples?
When I do a query that I know has 2 rows, I get rs.recordcount equals -1. Same thing when it's just one row. I need something that gives me the number of rows.
I was wondering if anybody could advise me how to return just 100 rows from a database query. In Cold Fusion I'd use the maxrows function, but not sure how to do in ASP (or can I do it in just SQL?). My code is thus :
' Retrieve last 100 records. Query then run through the query building a string Set objRetrieve = objConn.Execute("SELECT Players_ID, Players_Name, Players_Score FROM Players ORDER BY Players_Score DESC")
We've been asked to upgrade the system and one of the common complaints is that they often have to edit just one field, but for all the students. Currently you have a list of students and you have to click each one and go to their summary page before you can edit anything.
So they've asked if there is there any way of creating a 'spreadsheet like' view of my data and allowing the user to edit and either save everything, or save each row as they go (without causing a page refresh).
I managed to get a basic idea up and running, involving lots of wee forms or one big form... but my ASP ended up creating 266 SQL queries to do the saving (one for each pupil) ... and the script would just take forever. Code:
For example: If I had a table with the headings ID Colour Car 1 Blue Volvo 2 Red Fiesta 3 Green Mondeo 4 Red Volvo 5 Red Fiesta 6 Blue Fiesta
How could I use asp to count how many times say the colour red appeared in the table displayed in a numeric value, i.e There are 4 red cars in the able
Am I stuffed if I want to add a fifth row? From what I've read I will only be able to add more columns in this instance.Is this correct? And if so is there a work-a-round. Would I need to create a new array with one extra row, use the old one to populate it and then add my new row data?
When I try to sort rows of records in asp with sql I cant get them coming out right. The column I'm trying to sort has record values such as 63, 254, 98, 7 but when I try to sort them ascending I get 254, 63, 7, 98 but I want 7, 63, 98, 254. Please help because its been annoying me for ages.
I have a Javascript function which dynamically generates rows containing a List box having fixed options. Whenever i add a new row through my function the previously selected values in List box are not getting retained. This works fine in IE6 but not in FireFox 1.0 PR. This feature i am implementing using ASP and Javascript.
I want a way to be able to add up to 99 new items into a table. I've search around but haven't found much. I think I am using the wrong word or function?
In the code below I have the problem that I get an error if rstal("talent") doesn't exist for that record. What I want to modify is that if in the record rstal("talent") is in bof or eof or doesnt exist then just show image add.jpg. Code: