Putting Records From Recordset Into A String?

i need to put the records i'm getting from my query into a string, can someone tell me how to do this.

i've tried GetString, but thats not what i'm looking for, my query pulls up ID's and i need to put these into a string so i can split them up to be used in another query.

View Replies


ADVERTISEMENT

Putting Records Into Tables

I'm trying to put my data from Access DB into a table, but, where I know how to do it creating one row per record, what I'm wanting to do is essentially extract each record into 1 cell, and then have the next record in the next cell, creating a table 2xn in size.

The data I'm getting for each record is a URL & a file location, to create an image hyperlink for each record, and need the images to appear in a table 2 columns x however many rows required.

View Replies View Related

Num Of Records In Recordset

what the easiest way is to get the number of records in a recordset, or the number of records returned by my query. I can't get this rs.recordcount thing to work. it just returns -1 all the time. I read on asp101 that it only works when you're using the right cursor type but I tried using the cursor type they said to use and it still doesn't work. I also did the test they gave to check if your record set will allow recordcount()

Code:

If rs.Supports(adBookmark) Or rs.Supports(adApproxPosition) Then
Response.write "will work"
End If
and that works...

So can anyone help me plz!

ps. whithout looping through the records and counting them if possible plz! there must be a shorter way than that.

View Replies View Related

Counting Records In A Recordset

I have a query that is supposed to return only 1 record, however I recently found that because of an error in the database it can return more than 1. So what I need to do is capture if it is more than 1 record and alert the user to contact the database administrator. How can I get the count of records returned by a recordset? Is there no way besides looping through with a counter variable?

View Replies View Related

Desplaying Only Last Records In Recordset.

If I want to display the last X number of records in a recordset, how would I do it? Say I have ten records and I want to display them showing the smallest amount first: Code:

View Replies View Related

Recordset Paging :: Records Not Viewable

I am having a problem with my recordset paging. It does not crash however no records are viewable. It shows no information from my database.

It shows that there are 8456 pages and the href links and thats it.

I also did a response.write(mysql) response.end to check that my sql was correct. It is picking up the correct sql except no information. Code:

View Replies View Related

Recordset Paging :: Only Show 10 Records At A Time

I'm trying to only show 10 records at a time. I have the first 10 records showing. The problem is that when I click the Next button I get an error message: ADODB.Recordset (0x800A0BB9)

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. Also different people are going to search for different things so there will always be a different amount of records returned each time. I can't figure this out. My code is:

View Replies View Related

Fields From Records Into A String..

i need to open a recordset, then from the records that i get i need to put one field into a string. i'm not sure how to go about this hope i explained this properly, shout if i didn't .

View Replies View Related

ASP String Recordset Problem

I have a problem with an ASP application that I just can't solve. It has a database connection, and a recordset that was created through this query:

select iDayID, sName, iDay from tblDay where iMonth=2 and iYear=2006

now, my code reads this: Code:

View Replies View Related

Recordset Based On Records Selected Freom Previous Page

What I want to do is have a recordset with all records in and display a list by title with a tick box next to them, then goto a new page which the recordset is all the records that the user selected on the previous page.

View Replies View Related

Putting '/'

I have a form with '/' in some of the field names, when I pass through to
the next page the field name comes back as though it's been htmlencoded, so
getting the value out of the field I need to convert this back to '/' with
the replace (same problem if I have a ',' in the name)
Is there an easy way to htmldecode or something what it converted to the
encoded versions? (I have written a short function to basically do all my
replaces for me, but I am guessing this isn't the ideal solution)

View Replies View Related

Recordset.RecordCount Keeps Displaying "-1" Instead Of All Of The Records

I'm having trouble with the recordset object. I'm trying to use the "RecordCount" aspect of the recordset but it keeps diplaying "-1". How do I get it to show the total count of records?

View Replies View Related

Putting Asp And Javascript Together

I have a database table where I managed to add with ASP an extra column which breaks down the previous column "text_data" and counts the number of words: Code:

View Replies View Related

Putting A Pause Into ASP?

I have an app that I want to send out an email to each user in our member
list giving them their username & pw, but I don't want to overwhelm my mail
server since there are over 1000 users in my database.

I don't want to overwhelm my web server, either, having this app hog all
resources.

Luckily, I do have two processors running in this web server.
Note: web server and mail server are different boxes.

So... what kind of pause routine would you all put into my VBscript ASP
within the loop that sends out emails to all users?

View Replies View Related

Putting A # In A Href With The ?

If you have a href such as this,

href="somepage.asp?home=alpha&street=beta, how would you include a reference to a bookmark on that page, such as <li id="bookmark">Some List Item</li>

View Replies View Related

Putting Button

Is it possible to put the logoff/shutdown/restart buttons on an ASP page or something similar? If so can anyone point me in the direction of some code or where I can read how to do it?

View Replies View Related

Putting A Delay Into A Loop ?

I have an application which loops through several thousand subscriber
records, compares each subscriber's requirements to a database of
businesses for sale, and then prepares and mails off an email
containing info from the database that the client is interested in.

Problem is that the ASP file exits as soon as it has sent about 50 or
so records to the Mercury/32 mail server on the local Ethernet. No
error message or program execution issues noticed. I then delete the
first 100 or so subscriber records and set the file off again. In the
loop thru the next 100 subscribers it prepares an email for approx
every second subscriber, then seems to hit this 50 max limit and
terminates again. Driving me crazy.

I figure that somewhere there's a queue building up which maxes
something out and causes some low level termination. To test that,
I'd like to build something into the loop thru the subscriber file
that causes a delay of 10 seconds or so before the loop starts again.

Code:

View Replies View Related

Putting Database On Server

My database and ASPs are currently on my local server and now I want to put it on the company's server.

Any pointers how can I do that? Do I need to keep both the ASP's as well as the database on the server?

View Replies View Related

Putting In Images From Database

i am trying to put in images from the database and using something like:

<img src="I:/in_uni/<% response.write rs.fields('Image') %>">

but it isnt working.

also tried in:

<img src="http://cms-stu-iis.gre.ac.uk/ck227/test/in_uni/<% rs.fields('Image') %>">

but it still aint working!

View Replies View Related

Aviod Putting Url-information

We have two applications for one system. The first application is a vb-app
and the second is a web-app.

From the vb-app users have the possibility to enter right into the web-app.
The vb-app is creating an appropriate url and opens the web-browser with
this. The url contains user-information like user name and password. We
don't want this url-information to be stored in the history-list, because
then advanced users can find passwords etc here and that's not so good.

View Replies View Related

Putting Data Back

I am retrieving data from html form, perform some math. calculations on it and now i need to put this data back to some presentable form to display in asp.Earlier I get the data from FORM in text format, convert it into double value, now want to put it back in text format for dispal.

View Replies View Related

Putting Variable In Parameter

Is it possible to put a variable in parameter for a URL? I'm looking to have a page with an input box and a link. When someone puts in a value in the input box and clicks the link it will take the value and pass it through the link to an asp page.

example:

Employee Name <input type="text" name="Tname" size="20">
<a href="emp_info.asp?e_num= Tname.value">Employee Info </a>

How can I get this to work?

View Replies View Related

Putting Quotes Around A Variable...

I'm practicing making cookies and I've run into a small problem. I'm following this

Response.Cookies("name") = "Suzy Q."

I'm not using a physical, I want to load the information from a variable. all my variables that are not using letters work fine.

i've tried this: Code:

Response.Cookies("attyname")=attyname

and it will not get inserted into the cookie. how do i get the quotes around it like my example?

View Replies View Related

Putting One Line Of Code On Different Lines

I know this is Visual basic code, but the response should be global. I one line of code that stretches from here to Mars. Infact, it was used to guide the last probe there. How do I make it go over seperate lines? Code:

View Replies View Related

Putting A Formatted Date In A Text Box

i need to put a date of the following format: 14 June 2003 into a text box. i have seen some samples but i can't get what i want. i tried the following: <%=FormatDateTime(todaysDate,0) %> and it only rendered 00:00:00 .

View Replies View Related

Putting Session Data In A VBScript

I'm trying to create a VBScript using ASP. However I'm having
problems getting data from session variables into the right places.
The example I have copied below works, however I need to replace
"data1" and "data2" with real data from a session variable. Code:

View Replies View Related

Putting Current URL In A Session Variable

Is there any way of setting the URL of the current page in a session
variable?

I want to do this so I can create links and redirects back to the page on
which the user invokes a particular procedure.

View Replies View Related

Stopping People Putting Scripts Into Form Fields

im making a simple site where people can add comments into a shoutbox. only ive had experience of people adding in html tags and javascript to redirect people away from my site and display images etc which im not interested in.

how do i stop this from happening? is there a way to intercept the form contents and kick out the code leaving plain text? or changing the code so it displays the real code using &lt; and &gt; ?

View Replies View Related

Systematic Updating Of Records Depending On Amount Of Records In Another Table

The problem concerns 2 tables, cart_products and cart_shoppingcart.

Cart_products contains all the product data (eg, prices, product's key name, etc), but most importantly, it contains the quantity of stock (prod_quantity) for each item.

cart_shoppingcart contains all of the user's items in their shoppingcart, including those that are part of an (customer) order; these have the order_number to differentiate from those that aren't in any order (their Order_number is 'no_order', the others have the order number).

Now, what I want to do is this:

For every item in the order (ie, every entry in cart_shoppingcart that matches the username and order number), take the quantity (x) the customer is ordering, then take the quantity of stock remaining (y), then subtract x from y to create the new stock level (z) and update the appropriate record in cart_products with z (all this with SQl preferably).

I was thinking of using a Do while loop, but realised that it wouldn't work as I'd have to use several SQL statements and then I'd run into a problem the minute ASP reads "objrec.movenext".

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

Pulling Records From End Of A Database Or Inserting New Records To The Beginning

I'm trying to pull the last 5 records from my database.

<% j=5
rs.MoveLast
While ((j>0) AND (NOT rs_article.BOF))%>
''Execute HTML and data insertion here

<%rs_article.MovePrevious
j=j-1
Wend%>

Everytime I attempt to run this code, I recieve an HTTP 500- Internal Server Error. It tells me no more than that. I know that my connection settings are OK because when I move forward through the database (first five records), the code executes without error. And yes, my Cursor type is Dynamic.

Alternatively, I would also like to know how to add new recordset to the beginning of a database rather than the end.

View Replies View Related

Web Forms / HTTP File Upload / String.Split A StreamReader.ReadLine() String

I'm developing an Asp.NET system to take a CSV file uploaded via the web, parse it, and insert the values into an SQL database. My sticking point comes when I try to split() the string returned by readline() on the file.

The following code snippet works for me:
tokens = "one,two,three,four".Split(",")
for each token in tokens
response.write("<td>"+token+"</td>")
next

However, if I take the next line in the CSV, read using StreamReader.ReadLine on the PostedFile.InputStream, I receive "Object reference not set to an instance of an object." which I have narrowed down to be my string holding the line. Further investigation reveals that no other string member functions work on my line (.ToCharArray, .ToString, etc).

I suspect that StreamReader.ReadLine is not correctly returning a string, even though Response.Write(line) displays what I would expect .....

View Replies View Related

Grouping Records Within Another Group Of Records

I have an Access database with two fields that I would like to group by. The two fields are location and department. Field names are "Location" and "DeptName".

I have the code correct for grouping by location. That code looks like this: Code:

View Replies View Related







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