GetRows() And Hyperlinks
<%
' Loop through the array holding the result set and display the data
For iCounter= varC1Begin to varC1End
Response.Write("<a href=prices.asp?manuf=" & arrResultSet(0,iCounter) & ">"
& arrResultSet(0,iCounter) & "</a><br>")
Next
%>
In the above Response.Write statement arrResultSet(0,iCounter) displays the
manufacturer just like it should.
However, within the hyperlink, if a manufacturer has 2,3, or more words, it
will only show the first word. Anything after the first space is ignored.
Why?
View Replies
ADVERTISEMENT
I'm using getRows in two different SELECT stataments and want to know if it's possible to place the data in the two getRows into one array? Lets's say I have something like this:
Set rs = Server.CreateObject("ADODB.Recordset")
strSQL = "Select test FROM Table WHERE id = "&id&""
rs.Open strSQL, Conn
contentFirst = rs.GetRows
Set rs2 = Server.CreateObject("ADODB.Recordset")
strSQL2 = "Select id FROM Table WHERE id = "&id2&""
rs2.Open strSQL2, Conn
contentSecond = rs2.GetRows
Now what I want is a variable that holds the content of contentFirst and contentSecond like this: content = contentFirst + contentSecond
Can this be done in some way with arrayas? How?
View Replies
View Related
I was reading a sample on ASP101 (i love them), and it was, I think, saying u could specify the record u want to start at...is that true? If so, I think EVERYONE should use it...it would be very cool.
Because, if u need the 6th record, u can just get it, but, using a recordset, it would be, i believe, impossible...right?, or is that wat bookmarks are for?
View Replies
View Related
I have an ASP Session where I add values on Page1 and then use them on Page2 e.g Session("newsid").
What I want to do is when I click on a specific link, clicking on the link adds a value to the Session and then redirects the user to a new page, but nothing I do seems to allow me to do this. The code where I want it to be done is as follows: Code:
View Replies
View Related
I posted awhile back about displaying line breaks in ASP pages from MS Access Database records which was solved very well with the use of a replace function. is there a replace function to display hyperlinks mixed in with regular text in a memo field? If so, could someone tell me what the code is?
I use this for line breaks:
Code:
MemoField = Recordset1.Fields.Item("ArtText").Value ' Field from database
MemoField = Replace(MemoField,chr(13) & chr(10), "<br>") ' build in html line returns
and then:
Code:
<p align="left"><%=MemoField%> </p>
View Replies
View Related
Can anybody help me understand why these two examples do not work? The database has www.domain.com in it.
<a href="http://<% rs('URL') %>"><% rs('URL') %> </a>
<a href="mailto: <% rs('e-mail') %>"><% rs('e-mail') %> </a>
My other question is how should I store hyperlinks in my database? I'm assuming text but should I add the http:// there as well?
View Replies
View Related
I tried to get the data in array by using getrows. Data will be display in the drop down list in the future. i call a function to get the data. It should be return 8 rows of the data. But it return 0 row of data ....
View Replies
View Related
I'm using getrows to return the values from two columns in a MSSQL sql
database. Looping through them like so:
dim irowloop, icolloop, i
for irowloop = 0 to ubound(instances, 2)
for icolloop = 0 to ubound(instances, 1)
response.write("<option value=""VAL"">") 'get 2nd col val
response.write(i(icolloop, irowloop))
response.write("</option>")
next
next
How can I get the value of the second column into the VALUE=""attribute in the drop down?
View Replies
View Related
I am getting information out of a table to place into to an Array.
rs=DataConn.Execute(strSQL)
At this point I place it into the array
objArray=rs.GetRows()
But how do I handle things if the rs came back blank? What happens is that the loop encounters an error?
View Replies
View Related
Is there any way to how to put hyperlinks in a (flex/hflexgrid)?
View Replies
View Related
Say for instance that I have 2 frames and I have code in one. That code is returning information from a database. In that database there are hyperlinks to images. Upon clicking that hyperlink how do I force the image into the other frame?
At present It opens appears to go to a new page, but everything is coded in one ASP page. So I have to click back to select another image? I want to be able see both the database and image so I dont have to go back and forth
View Replies
View Related
Since I never user .GetRow, (because arrays drive me crazy) I thought I'd give it a shot with something I had to do, unfortunately I get several errors. Code:
View Replies
View Related
I built a recursive forum (tree) with ASP (VBS) and getRows and the DB Microsoft Access.
When I tried to add a pages division (with ADO) it destroyed everything
The relevant code:
The ADO pages devision:
rs.PageSize = MessagesNum
rs.CacheSize = MessagesNum
If Not rs.EOF Then
PagesCount = rs.PageCount
rs.AbsolutePage = Page
arr = rs.getRows
End If
Code:
View Replies
View Related
I need to format each row being returned in a recordset as
a hyperlink. One of the fields being returned is the
subject of a message that my hyperlink will show. When
the hyperlink is clicked then the ASP page loads further
message details of that link. Does anyone know how to do
this?
View Replies
View Related
I added a column to my Access database and defined it as hyperlink.
I added some URL in the fields and i was able to see the underline under each address.
In my code i added the following line :
Response.Write("<td align=right>" & oRS("info").Value & "</td></tr>")
(The hyperlinks defined in my database as info).
I'm able to see the hyperlink when i retrieve all other data but it appears as
#http://www...asp# and with no underline what is the reason and how can i change this ?
View Replies
View Related
I have the following:
dim app_ids, irowloop, icolloop
app_ids = get_app_logins(session("stremail"))
for irowloop = 0 to ubound(app_ids, 2)
for icolloop = 0 to ubound(app_ids, 1)
response.write(app_ids(icolloop, irowloop) & ",")
next 'icolloop
response.write("|")
next 'irowloop
That returns:
0,0,bobsmith,pAssWord,|0,71,tom,tom,|0,71,tomf,pAs sWord,|1,5,tom,a1,|
Is it possible to remove the final ',' before the '|' ??
View Replies
View Related
I recently learned about the wonders of the getrows statement on a recordset (IE alldata=rstemp.getrows). It dumps a recordset into an array, that I get. Sounds great! My question is: Is there a way to support a SQL shape statement using the getrows statement? I'm guessing that if I try to throw that into a variable it may not like it.
View Replies
View Related
I know that getstring or getrows increase performance but my question when to use this method. This is because what I know is this method will output all fields in a table and not just certain few.
View Replies
View Related
What is the difference, and when to use one over the other?
View Replies
View Related
I'm writing a company intranet site,and on the home page,I'd like there to be links to some of the software that the employees frequently use on their own computer.This will be the inducement to get them to use the intranet home page as their default home page, and visit it frequently.
For example a program which is under:
"C:Program FilesNow SoftwareNow Up-to-DateNUD.exe"
if I write that link into the hyperlink,it will not work,because the hyperlink also adds the url as a prefix to the link, so it will say
"http://www.url.com/C:Program FilesNow SoftwareNow
Up-to-DateNUD.exe"
View Replies
View Related
im currently trying to generate a list of links to files held within my database.The file itself is a pdf
Im currently using this code :
Code:
response.write "<A HREF='" & RS("file") & "'>" & RS("linkname") & "</A>"
and its giving me the error:
Microsoft VBScript runtime error '800a000d'
Type mismatch
/irtwebsite/welcome.asp, line 27
View Replies
View Related
I'm using Visual Web Developer Express 2005 to get me started - probably a bad idea I'm told. Anyhow, I've connected a drop-down list ('Components') to a column in a SQL DB, and, upon selection, the resulting gridview is being generated as I hoped (with the corresponding 'Applications').
However, I would like each of these resulting rows in my gridview to be "clickable" as a hyperlink so that I can display each of the applications details on another page. If someone could enlighten me as to whether/not this is even possible, and if so, how?
View Replies
View Related
Can anyone provide the code to hide hyperlinks (change to background colour?) if the files they link to do not exist?
View Replies
View Related
anyone know some good ASP code to go through a page and test the hyperlinks to make sure that they are valid. Couldn't find anything good yet, but if someone knows of anthing.
View Replies
View Related
I'm trying to excecute all the hyperlinks on a webpage one by one with a specific order automatically, any suggestions/helps on that?
when a link is executed (clicked), a popup comes up asking you to open or save the document, is there a way to by pass that? And save the file automatically into a specified location?
View Replies
View Related
When querying a database, I know I can fix the no. of returned rows/results to 20 (for example) using the GetString method:
myVar = objRs.GetString(, 20, , ,)
What syntax do I need to use to do the same with the GetRows method:
myVar = objRs.GetRows ?
View Replies
View Related
I currently thinking of converting from my little knowledge of
VBscript to jScript ASP.
With this in mind I'm looking at my current code to see how it will
convert over to Jscript.
One thing I have spotted that I can't think of a way round is the ADO
recordset.GetRows command.
I have a VBscript class that handles my DB connections so in short I
can do things like
MyArray = clsDB.GetRecordsInArray("Stored Proc Name/SQL", other
params)
and this would return the rows into a 2 dimension array.
Problem is I've read that Jscript only has one dimension. So how is
the "getRows" solved for Jscript.
Also is there any good "Jscript" code learning sites?
View Replies
View Related
I am reading an recordset into an array using getrows, but my recordset has 38 records but my array has 46!!
If I loop through the array, it errors on number 38 (as expected). I am using UBound to find the array length.
can anyone think what is going wrong, without the need to post my code (step 2!)?
View Replies
View Related
I have a page which takes data in an HTML table, and exports it to an Excel file. It works fine, but I want several things about the spreadsheet to look different from the HTML version. Things like fonts and colors. I think I can use a style sheet for the latter, but I haven't figured out how to remove hyperlinks from some of the items. On the HTML page, the hyperlinks are useful, but I don't want the spreadsheet to have them.
So on my ASP page which builds the Excel file, I have this: ...
View Replies
View Related
I'm using the following JOIN query;
Code:
strQuery = "SELECT whoisserver.host, [domain].domainid, [domain].[domain]" & _
" FROM [domain] INNER JOIN [whoisserver] ON [domain].whoisserverid = whoisserver.whoisserverid"
Which works perfectly. when I use getRows to store the results in an array, the whoisserver.host field isn't in the array. Only the domain.* fields are in the array. Anyone know why this is, and how to solve it? I really need that whoisserver field.
View Replies
View Related
I pull file paths from a database that point to files on our internal server and create links to them. For Explorer this works...
File://servername/file/path/filename.snp
But not for FireFox.
View Replies
View Related
I have a Submit button on a web page that runs the following hyperlink code below.
<p>
<a href="ProducsTotalBasket.asp?Remote_computer_name=<%=FP_FieldURL(fp_rs,"Remote_computer_name")%>&Committed=<%=FP_FieldURL(fp_rs,"Committed")%>">
<input type="submit" value="Click to Continue" name="ClicktoContinue"></a></p>
The hyperlink uses parameters that pass the value of the "Remote_computer_name" and the value of "committed" to a SQL statement that uses the values returned to update the underlying database.
The hyperlink code runs perfectly when I click on the submit button on the web page and updates the database however at that point I want the user to be redirected to a new page i.e. a second URL address.
View Replies
View Related
I'm using getrows to speed up data access time, i wonder though if there is a better way. Each recordset returns up to or more than 500 records, this is still quite an overhead for the server when there are lots of people on the site.
Rather than reading all 500 records into the array and then paging the results is it possible to create the recordset with just 25 entries?
ie if you are on page 1 then only the first 25 records are retrieved from the database, page 2 - records 25 - 49 are retrieved etc
or will this slow things down?
View Replies
View Related