DISPLAY NUMBER OF AFFECTED ROWS(odbc_?)

i have written a code to change password. it works perfectly i.e. sql query "update is ok", now i want to display number of affected rows that i can inform user if password is changed or not. Code:

View Replies


ADVERTISEMENT

Checking For No. Of Rows Affected Using Command.Execute

DBMS: MS Access 2000
ADO Version: 2.8
IIS Version: 5.1

I'm trying to use the ADO's Command object, Execute method to execute a SQL Update Statement. I would like to ask how do I check for the no of rows affected by the SQL Update command.

View Replies View Related

Number Of Selected Rows

From a PHP background I could use mysql_num_rows() to get the number of selected rows from a SQL query. Looking through Google I can't see a way to do this with ASP.

One place I looked said you need to loop through all the selected fields and using an incrementing counter, which doesn't sound like a good idea :/

If this is the case (which I hope it isn't), is there any way like PHP which you can then tell the SQL object to go back to the begining so you can reloop it (if you catch my drift)?

View Replies View Related

Counting The Number Of Rows

I need to count the number of rows in a table, and set the number to a variable so I can use it as a sentinel for a control loop . I know I'm supposed to use Count(*) but i'm not quite sure of the syntax. for i=1 to (the number of rows in the table) if breakloop=true then exit for (CODE) next .

View Replies View Related

Count Number Of Rows In A Column

I have created a form which asks the user a series of questions. I am able to retrieve the information from the database but I need to know how many rows of data has been entered for each question.

For example I have a question which asks the user what age range they belong to. I need to find out how many rows of data has been added into this column in the database. Code:

View Replies View Related

Can ASP Table Display 200 Columns, 500,000 Rows?

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.

View Replies View Related

How To Display Data In 3 Columns By 4 Rows Format

I will be eternally greatful if someone can provide snippet of code,
URL or reference material that shows how to display data in a "n
colums * n rows" format.

I am new to ASP and have looked everywhere that I could, but I have
not found an example where data can be formatted to be displayed in a
3 * 4 foramt, like many of the professional sites would do (actually
rows and columns can be any number of rows and columns) All the
examples that I have seen, show data displayed in a top down format.

View Replies View Related

Display Certain Number Problem

I've got the following problem:
I want my ASP page to display a certain number (based on a COUNT query),
it works fine if the result is at least 1! If there are no records to be
counted (= the query is empty), I get errors.
What I've tried is this:

if rsNP_MB_Site.BOF = true or rsNB_MB_Site.EOF = true then
response.write "amount: 0"
else
response.write "amount: " & response.write
rsNP_MB_Site.Fields.Item("NP").Value
end if

But I keep getting an 'object required' error?
I've also tried with isnull(rsNP_MB_Site.Fields.Item("NP").Value) but
that didn't work out either.

View Replies View Related

Display N Number Of Records

how do I display only n number of records? then create links to the next set of n?

View Replies View Related

Display Next Incremented Number

I am creating a submission form that is submitting data to an SQL Server database. I am pulling dynamic data into drop down boxes wherever I can. There are three places where I would like to show the user in a textbox the incremented number that is being assigned to each incident.

I know that I could show the user a confirmation page with the assigned incremented number, but I was wondering if it would be possible to view the next available incremented number in the form before the form is submitted. For example:

On the form, the user would see:

Incident Number: 1 "This would be viewable in a textbox and then submitted to the database - for the first reported incident
Incident Number: 2 - for the second reported incidet etc.

Once again, I'm trying to allow the user to see the assigned number for each incident before they submit the form. Is this possible?

View Replies View Related

Count And Display Number Of Records In Table

how can i Count and display number of records in table?

View Replies View Related

Convert Real Number Into Text Number

I need to insert some number into database as text. My problem is if I insert the number (ie. 4.0), the value in the database only show (4). So, is it possible to convert a real number into text number using ASP?

View Replies View Related

Sequential Number After Batch Number

here is the scenerio

in master batch table i have various master batch like
200701-0001
200701-0002
200701-0003

Now each master batch can have multiple final mixed batch like

200701-0001-01
200701-0001-02
200701-0001-03

and this record is inserted in to fmix table.

so i have a form in which i have a dropdown menu in which all the master batch is listed,
i select 200701-0001 and that value is passed to next page where i will enter other fields data and insertion to my fmix_no will be done automatic like 200701-0001-01, 200701-0001-02 and so on,

how to achieve this

so in short each master batch will have more than one final mixed batch.

pls help, also if u have any online contact in yahoo or msn pls send me, i am so confused and badly struck deadline is just couple of hours away. my yahoo id is(E-Mail address blocked: See forum rules) you can PM me i am online right now.

View Replies View Related

Retrieve The Error Number In VB With Err.Number

I want To handel the error messages by myself in one part in my script. I know that in VB I can Use the statment - On error resume next And I also know that I can retrive the Error Number In VB with Err.Number.

How can I handel the errors by myself in ASP? I heard about the ASPErr Object, Is it the same thing like the err object in VB?

View Replies View Related

Max Rows

Does any one know a good site where I can go to learn how to let the user determine how many rows they want to display?

View Replies View Related

[ASP] Sequence Rows

In the table MYSQL I have this sequence of rows:

CODE===========NAME
610=============ASSI
610=============ASSI
610=============ASSI
610=============ASSI
619=============ASSI-9
619=============ASSI-9
619=============ASSI-9

I like to see:

ASSI

and query that counts for all rows like ASSI ...

View Replies View Related

Add Rows On Form

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.

View Replies View Related

Combining Rows

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?

View Replies View Related

How Many Rows Returned?

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.

View Replies View Related

Returning Only 100 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")

View Replies View Related

Editing Many Rows At Once

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:

View Replies View Related

Flashing Rows

Does anyone know how to make a table row flash in a certain colour,
depending on a DB value?

I have a helpdesk application listing statuses of Agents and the calls
queued on the system.

When a call is queued, I wish to make that Agent's Table row, flash.

Or even a cell flash.

Any ideas?

View Replies View Related

Counting DB Rows

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

View Replies View Related

Counting Rows

i know that in sql you can output the amount of rows with COUNT(col_name), but what asp do i need to output this

View Replies View Related

Get Total Rows

I have a list of data in a database(access). How can I get the total rows in the database?

View Replies View Related

Put All Rows Into A String

I have a column called state with 50 rows as 50 US states. I want to display the rows as one string like TX, NY,How can I do this easily?

View Replies View Related

Add Rows To Dimensioned

Is the following assumption correct?If I setup an array with 5 rows and 8 columns.

Private invoiceItemsArray
ReDim invoiceItemsArray(4,7)

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?

View Replies View Related

Sort Rows With SQL

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.

View Replies View Related

Dynamic Rows

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.

View Replies View Related

Rows In Recordset

How can I determine the number of rows in a recordset? myRecordSet.Fields.Count returns only 1?

View Replies View Related

Selecing Only Rows

Is it possible in a ASP page when querying a table to only pull out the rows with data in, and not display the rows with null values?

View Replies View Related

Add Multiple Rows

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?

Entry page would look like:

1. var1, var2, var3,... var10
2. var1, var2, var3,... var10
3. var1, var2, var3,... var10
4. var1, var2, var3,... var10
5. var1, var2, var3,... var10
99. var1, var2, var3,... var10

I can't do a "INSERT INTO table_blah Values()" . Should I look towards an Array? I suck at those.

View Replies View Related

How Many Rows Are There In Table

adoRS.Open "select * from table_name"

numField = adoRS.Fields.Count
response.write("Number of Filed of table_name = "&numFiled)

how will i know how many rows are there in table_name? is there a

numRows = adoRS.Rows.Count

any help with this?

View Replies View Related







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