Alternate Text For Empty Recordsets
So I have a layer with a repeating table displaying the results of a recordset that are associated with the record being displayed behind the layer in a table. The problem is when there is no record to display it looks weird there. I'm trying to get it so that when that recordset is empty it puts an alternate text in that spot saying no records were found. I tried to get it done by throwing a layer on top of the existing layer whenever the recordset is null. The problem is the code I'm doing it with won't let me have quote marks, which are required for anything more complicated than basic text. Anyone have suggestions? Here is the code I'm using: ...
View Replies
ADVERTISEMENT
I'm getting an error when I'm retreaving from a "text field" in the database and it has no data in it. I'm using MYSQL version 3.23.58-nt. I have the same script running a different system and I don't get this error. It justs output nothing and continues with the loop.
This has to be an ASP problem when retrieving data from the database. I've change the Field for Message to "varchar(252)" vice "text" in the database and stoped giving me error. But I still need to use the type "text" in the database since my "Message" will be longer then 252 caracter. Code:
View Replies
View Related
I've got a SQL server database, and am using ASP to create a simple recordset.
Everything is fine, except that one column of the database is of 'text' data type. I can't seem to be able to pull anything from this field in my ASP script. All names and variables are correct, and there is data in the text field, it just comes out blank when I pull this field into my recordset.
View Replies
View Related
I found one website say that it will auto alternate the position of advertisements for every 5 minute. My question is how can they do that.If we want to change database like this we have to use internet explorer to call asp script in client side.
Does the webmaster of this website always open that asp page and make it runs all the time?Or can we always 24 Hrs. run the asp script on the Server not Client?
View Replies
View Related
Using HTTP_REFERER I cannot capture the URL when the link is made via a
button:
<input type="button" name="Continue" value="Continue Shopping"
onclick="ContinueShopping('http://mysite/supertest.asp');">
I do not control the script above, it is on an e-commerce site that is very
generic, meant for many users - and is generated by their server code. I
want to capture the URL and with an if/then redirect if the last place
visited was the checkout site.
I need an alternate method of URL capture, rather than HTTP_REFERER.
View Replies
View Related
Attached is my code. Its working fine and produces great results but all the rows are in the same color background (unless mouse-overed).
What would be interesting to see if I can get alternative colors working here...
Can anyone dig in the code (maybe re-juggle) and help me with alternate row colors?
First Row to be #FFFFCC
Second Row to be #CCCC99 when not mouseovered
View Replies
View Related
I am putting the results from a database in a table using ASP. How can I get alternate colors in each row. (i.e. first row white, second grey, third white, forth grey, etc.)
View Replies
View Related
I am in need of something like mod_rewrite or an alternate solution.
I have a client, who's website is all HTML files (200+ files) and was previously password protected by javascript only. Anyway, what I need to do is password protect the site using a better solution, which would be a server side scripting obviously.
I am familiar with apache's mod_rewrite and PHP, which would make this problem easy to solve by simply passing the HTML file to a php file, then after neccessary security checks, pass the requested html back to the browser..
The only problem is that its on an ASP server and I have no knowledge of ASP. I am not even 100% positive what kind of server it is, I just know that .asp files work in it and .php does not.
Anyone know of something like mod_rewrite for ASP or an alternate solution that would work in my situation?
View Replies
View Related
In my application I need to read the lines from the text file. I use the following script to do that.It doesn't seem to work because of the Norton Anti virus script blocking. I cannot do anything to Norton so I want to find the alternative way to read the lines from the text file. Quote:
Dim objFSO, objTextFile
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile(Server.MapPath("ProgrammeDetails"),1,false)
Do While Not objTextFile.AtEndOfStream
Response.Write objTextFile.ReadLine & "<BR>" & vbCrLf
Loop
objTextFile.Close
Set objTextFile = Nothing
Set objFSO = Nothing
View Replies
View Related
how to have table alternate color everytime im using for and next statement..? example:
Code:
<%
for a = 1 to 10
'write td here with alternate color..
next
%>
View Replies
View Related
Example:
Table: FRUIT
column1:
apple
bananas
grapes
column2:
I like apples.
I like bananas.
I like grapes.
I'm trying to have it where the choices from column1 are provided on the form, and based on the what was chosen on the form the corresponding choices from column2 are display on the page.
View Replies
View Related
I have a fullscreen page which needs to incorporate a forward, back, and close button. I have this working fine but after a review, people suggested that the foward and back buttons not be active if they do nothing.
In other words they want them to function exactly like a standard browser's forward and back button. When you open a page in a new window, the back button is grayed out until you move to another page. The forward button is grayed out until you move back a page.
Can this be done?I need to place a grayed out image if there is no back history or forward history. Otherwise, I need an active image with the back and foward action.
View Replies
View Related
I am going to need to offer alternate index pages for each user that visits the site. So, I would have index1.asp and index2.asp. User 1 gets index1, user2 gets index2, user 3 gets index1, user 4 gets index2 and so on. how to do this?
View Replies
View Related
I have a set of web pages on an AD-authenticated web site that are
supposed to allow users to modify their own AD account attributes,
limited of course to things like their email address, URL, etc. I was
hoping to connect to LDAP using secure authentication as described on
a few tech web pages, and the connection works fine but when it's time
to commit the changes with .SetInfo, the script fails with: Code:
View Replies
View Related
Does anyone know of any easy way to have shading on alternative rows in a table that loops through the rows in a recordset?
View Replies
View Related
I have a page that uploads an xml file and reads it into a SQL database. The
page is transactional and aborts if there are any anomalies in the xml.
My problem is that the if I repeat an identical import the transaction
succeeds the first time and then fails the next time. This pattern continues
with subsequent repeats. I have removed all of the ObjectContext.setAbort()
calls but still the onTransactionAbort() sub is called.
View Replies
View Related
I am creating a dynamic ASP VBScript page, which gets data from an Access database.
In the database, there is a field which holds a URL to an image. I can get the image to display fine, but where there is no file that matches the URL (i.e. a missing image) I want to display an alternative, default image (e.g. one that says "Awaiting Image"). The field is never blank, but the image file may not exist for all records in the database.
I think what I am trying to get to is the following:
If file exists (using URL from database to get location of image file) then
display image using the url from the database as the image source
else
display default image - hardcoded in program
endif
I have had a go and come up with the attached but I get an error with my if statement...
View Replies
View Related
im building a page which has a few while loops. this means that im inevitably going to end up with about 20 recordsets on the page. will this slow the page down at all? its quite a lot of hits to the database/server. the results the recordsets will be returning wont be that big though.
View Replies
View Related
My ASP code creates an ADO recordset object on the server.
Later on the same page, I have a javascript code snippet that I use to
dynamically populate a drop-down box based on choices made in another
drop-down box. Can this javascript (or a server-side equivalent)
View Replies
View Related
Is there a way of using multiple recordsets with the same connection?
My recordset at the moment inserts data into the database, and i want to have a drop down box with data already within the database, as well as the insert recordset, is there a way of doing this?
View Replies
View Related
Am having trouble opening multiple recordsets - keep getting the er:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Could not use '(unknown)'; file already in use.
/eft/postflight4.asp, line 146
Have checked the permissions and the user has full access.
Code:
View Replies
View Related
How do I create a recordset from another?
e.g.
sSQL1="SELECT * FROM ThisTable"
rs1.open sSQL1,conn
sSQL2="Select * from (rs1?) WHERE name='fred' "
rs2.open sSQL2,conn
View Replies
View Related
I 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)
View Replies
View Related
Is there a performance advantage to parsing thru a recordset verus using an array?
I'm currently trying to populate a listbox by returning data from my database, then either parsing thru the recordset until I reach the EOF, or putting the data into an array.
View Replies
View Related
I have never sorted a recordset - using rs.Sort - i have no problem sorting it in SQL.
All the tutorials i get say that i have to use a client cursor location, so this is my code:
View Replies
View Related
Let's say you have pages 1 | 2 | 3 | 4 | 5 and you're on page 3. How do you make the code so that 3 will be without url?
View Replies
View Related
Assuming I had a recordset set up like this:
Set rs = Server.CreateObject("ADODB.Recordset")
is it enough to close out the code with
set rs=nothing
or is there a benefit to
rs.close
set rs=nothing ?
View Replies
View Related
im building a site for a clinic. they want to have a calendar which displays the times for each day that are available for appointments.
at the moment i have a calendar on my page. i want to display the correct times for each day. should i use one big recordset that gets all the times/dates from the db or cycle through each day and create a recordset for each day that there are times available (some days the clinic wont be open)?
if i go with the latter option, i could potentially have 30 recordsets open. is there a fast way to execute recordsets.
View Replies
View Related
I have an array of items and for each item I need to find sizes and and for each size I need to find colors The array of items comes from the previous page. Code:
View Replies
View Related
I have a table that is just dumping an entire database data. I would like to have the values of the columns re-sort the data. Not the column heads for the data displayed under the column head varies.
For example, one column, Components, displays 80 components types and another column, Category, displays 40 categories types. When a visitor clicks on one of the component values, it should then display only that data. I've done this before but, it has been a very long time. I remember creating a link surrounding the recordset in my table but what was written.
View Replies
View Related
I have 2 recordsets. One contains all customer info data, the other recordset contains 1 field of customer id's.
How do I create a recordset that contains all customer information (from the 1st recordset)for only the customers in the customer id recordset (2nd recordset)?
View Replies
View Related
I have two different query in my ASP page:
- the first is the list of all my users:
"SELECT DISTINCT lastname, id FROM table1"
- the second is the list of users that join a meeting:
"SELECT DISTINCT lastname, id FROM table1, table2 WHERE table2.codeMeeting = " & Request("code") & " AND table1.id = table2.id"
I want to show all the users in a table (with a FOR loop), with a checkbox that is checked if the users join the meeting (= if users is in the 2° recordset)
How can I do?
View Replies
View Related
I need the IF statement to check 2 recordsets.
If the first recordset has data within then write this to the asp page, If not and the second recordset has data in, then write this to the asp page, then finally if neither of the recordests contain data and are NULL to write 'No Records'
View Replies
View Related