Show Table If Field X Is YES
I have problem to print out a table data only the data witch have the field paid yes..
I used
pi.Open "select * from invoicees where paid like '"&yes&"', "DSN=anitel"
What's wrong
I have problem to print out a table data only the data witch have the field paid yes..
I used
pi.Open "select * from invoicees where paid like '"&yes&"', "DSN=anitel"
What's wrong
where in i could show in a dropdown the database table name as i would like the whole databse be searched according to a specific table?
View Replies View RelatedIs there a way to hide a table using asp?
I would like to 6 radio buttons and if one is selected then a table with further contant/ checkboxes relates to that particular checkbox become visible.
ie. radio button will display table 1 etc.
the table should appear under the selected radio button.
I created a link click counter. Now I want to read and show to the public one layer of the table, with one specific number. How do I make to read only one specific "cluster" of the table of the DB? My script already records new entries, the problem is reading a specific cluster. I am using a Acess DB. Simple connection with the following connection code:
<code><%
set conn = createobject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0; data source=" & server.mappath("contador_clicks.mdb")
set rs = conn.execute("SELECT * FROM clicks ORDER By id DESC")
do while not rs.eof
%>
......
</code>
I want to add articles to a database with the intention of displaying the first so many characters (like an intro) of the field on the home page. The database would be an Access db with the field holding the html for the page in question. How would I go about this?
View Replies View RelatedI have a product table in Access, like this:
product_id | product_name | product_quantity
I need to be able to do an SQL update on this table to subtract 1 from the product_quantity field.I could do this with two SQL queries (SELECT product_quantity, then subtract 1, then UPDATE table) but I'm sure there must be a way just to run one query which subtracts 1 from the field. how to do this?
I am developing small asp application.There is a database called db.mdb and there are three tables(tblUser,tbsImport,tblcitylist) In tblcitylist there are two fiedls
1.Town
2.LReg
According to the relevent town there is a LReg (Lreg is a name already assign to the town)
this part is ok.
In my tblUser there is a field called Town and LReg (Same as above table)
But here LReg is empty.I mean there is a default value called "N/A"
I need to create a asp page for following purpose
* i need to read tblcitylist table and according to that I need to fill the LReg fields of TblUser Code:
I have more than one date field on my ASP forms (and in the sister MS Access table) I can not write (created the record in Access table) to the table UNLESS there is date data in ALL the date fields on the ASP form.
I need to be able to have the user enter only one date, then do back at a later time and enter the other date.I am using the short date format in Access table (MM/DD/YYYY) When there is only one date field (on ASP form and in Access table) the date is written and the record is created.
This is probably a simple question, but how does one format a table such that if a field is a certain value, then it will have a specific color.
For example, in the code below, if the specific field named "Year" is '2004' then I want it to appear in red, otherwise it should appear in black. Code:
What i am trying to do is Update data in a table with data in another table but i want to update 2 fields in the destination table with data from 1 field in another table.
These are the table i have and their fields:
*CUPFirstRound* - Table1
GameId
GameDate
Home
Away
HomeScore
AwayScore
Winner
There are 8 rows in this table, thereofre the GameID's go from 1 to 8 Code:
I need to parse a string from a single, semi-colon delimited, 60 character
field (el_text) in a recordset and display the results in a table on a
webpage (ASP)
I can retrieve the recordset from the database and display the field data
results in rows of a table but have the entire 60 character string in one
cell. I need to break that string apart and put each semi-colon delimited
value in it's own cell. Then move to the next record and do the same thing
in the next row of the table. - and so on
I'm using ASP, VB Script with DMSII Database and OLEDB
Does anyone have some code examples on how to break this field apart and
then arrange the data into an html table on a webpage?
I need a way of putting say 10 to 20 bullet points in one table field in an
Access database
- say seperate them with a special character, then build a bulletted list on
my page.
If I can get the page to detect each special character, insert a new bullet
and move on to the next occurance in the string... Code:
Here is my code. I'm using 2 pages.
(Page 1) blob.asp
<%
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_blob_STRING
Recordset1.Source = "SELECT AboutPic FROM Elizabeth.GF_AboutUs"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Response.contentType = "image/jpg" 'Recordset1.Fields("AboutPic") <---Tried
both methods
size = Recordset1.Fields("AboutPic").ActualSize
blob = Recordset1.Fields("AboutPic").GetChunk(size)
Response.binarywrite(blob)
%>
(Page 2 Show the Image)
<%
Dim urlString
urlString = "?" & Request.QueryString
%>
<% Another rs to show other information as text from the same table %>
<body>
<img src="blob.asp<%=urlString%>" width="194" height="256">
</body>
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 ....
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)?
I am using a Relational database for my site and i have the following tables:
FIXTURES, GAMEDATES
the fields in FIXTURES are:
GameDate
Home
Away
(All of the above are numerical fields)
the fields in GAMEDATES are:
DateID(integer)
GameDate(#Date Field#)
What i have done is in the GAMEDATE field in the FIXTURES table i have used the ID number of the date that i wish to assign to that record - using a LEFT JOIN to display the actual date that is pulled from the GAMEDATES table (That which corresponds to the relevant id used in Fixtures)
The problem is that in some of my code i want to display records using sql and sometimes in the where clause i use the following:
WHERE Fixtures.GameDate<=(Date())
obviously meaning WHERE GAMEDATE is LESS THAN or EQUAL to TODAY.
The thing is when i use the join it does not use the where clause and displays all of the records in the FIXTURES table.
Does any one know how to get around this, i have not received any error messages it just isnt displaying the right data
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:
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 RelatedHave 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.
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 RelatedI 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.
Im comparing values in a field while doing a loop if sAct<>myData(5,i) then At the end of the loop I make the value of sAct equal the current myData
This will work when comparing other fields withing my recordset (so I know the statement works) but it will not work for the field I want to compare. The only difference with this field is that it has null values. Could this be the problem? if so, how do I deal with nulls?
I have a input form with 5 fields. One of the fields is MajorNo and the other is named Description.
I have a reference table in my MS Access database (tblMajor)that lists the major numbers and their descriptions.
I would like to have the description field in my ASP automatically filled based on the major number entered on the form, so the user will only need to input the major number when submitting to the Access table (tblSalesTotal).
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:
is there a tutorial around anywhere that tells you how to change images on the page when a user selects from a select box
View Replies View RelatedI have a database of songs listed as Title, Artist,Description, DiscNo and TrackNo with a seperate record in that format for each song.What I would like to do is search through them for the Description, show only the disc numbers in the results.
This I can do easily. Where I am lost is that I only want each individual disc number to show once. If I moveNext through the recordset, it shows the disc number 15 times per disc. Is there a filter I can add to limit this display?
Is there any way to input .asp code so that a specific element isn't show on a page? example: I don't want a menu on a specific product page, but I want it on all the others. Is there any code to input into a site wide includes file to implement this?
View Replies View RelatedI have a ASP application which let user to download their reports in pdf format. I would like to show a progress bar, or change the mouse cursor to a hourglass while the user is waiting for the file. How to acomplish this? In the asp code, I use response.BinaryWrite to create the pdf file directly to the browser. How to detect when the file is ready?
View Replies View RelatedI create a page which will show me all the Regions from the table "RegionTable" where I have no information (empty fields) in on of the fields RegionDescription or RegionRank.
It is to make my content managing easier. I do not want to see those records which contain all the necessary info (region description and rank).
I tried the following code, but it does not work
qry = "SELECT * FROM RegionTable WHERE RegionDescription="" AND RegionRank="" "
error message is:
([Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1)
I have a query that displays values from a db.
The problem is that the value displays like this:
R 6.5
instead of like this:
R 6.50
How would I get it to show the full value?
ok, well what I have been having some trouble with is to show the person character name like this:
Welcome, 'Username' <-- Here I want it to show the persons username from the database.
I am using a Cdonts e-mail script that e-mails the results of a form to my address. It currently displays the data like:
Amount: 12.00
Percent: 2.00
I need it to say:
Amount: $12.00
Percent: 2.00%
How can I get the $ and % symbols to be included in the e-mail template without getting a 500 error?
Here is what I have:
Body = Body & vbcrlf & "Amount: " & request.form("amount")
Body = Body & vbcrlf & "Percent: " & request.form("percent")
I've tried a few diffrent ways but here is one example:
Body = Body & vbcrlf & "Amount: $" & request.form("amount")
Body = Body & vbcrlf & "Percent: " & request.form("percent")%
I've tried using / before the symbols and "" but everything I've tried keeps coming up with a 500 error. How can I add these symbols to my template so they will show up in the e-mail?
I know we have this thread somewhere, but I can't seem
to find it now
I want to show the first 100 chars of a string, but
I don't want a word to be cut in half at the end, it must
show the whole word then and go a bit beyond 100 chars.