From DataSet To Int

I have a method that uses Microsofts Data Block to get me a value from the database. This returns a DataSet. I use this kind of data as string a lot using the following:

ds.Tables[0].Rows[0].ItemArray.ToString()

The problem is: I do not want a string now. I need a int, because the value is a int which I have to increase with one and then return back to a tring again to put in a disabled textbox.

I just need to know how to get from a DataSet to an int or from a String to an int.

View Replies


ADVERTISEMENT

Display Dataset

I am pulling 40 records from a MS Access database, and displaying them in an .asp page..
The majority of times, there are no records to display in the last 10-15 records, so they show up as a blank space on my web page, pushing the rest of the content further down.Is there any way that I can elliminate this?

View Replies View Related

Edit A DataSet

I have a DataGrid which has checkbox columns. The data source is a run-time created data set that I store in a session so I can rebind it during postbacks. I don't have a database or xml file, etc.if it's possible to edit a dataset directly? So when I click on a checkbox it will change the value in the dataset and store it back into session?
If this is not possible how can I use arrays or vectors to temporary store my checkbox statuses? I guess it's not possible to have one DataGrid have more than one datasource

View Replies View Related

ASP Dataset Issue With SQL Server

Am putting a web front end over an existing SQL application, creatind a ado recordset which is to be displayed in a table on the screen, however when the page runs the recordset returns correctly however only the first two columns have data in, the remaining columns in the table are blank.

Have to use both an sqlview and base sql select statements for the recordsource both the same result. I know it is not a permission problem as I can run the query in sql with the same credentials ok.

View Replies View Related

Edit A DataSet (not DataGrid)

I have a DataGrid which has checkbox columns. The data source is a run-time created data set that I store in a session so I can rebind it during postbacks. I don't have a database or xml file, etc.

I am wondering if it's possible to edit a dataset directly? So when I click on a checkbox it will change the value in the dataset and store it back into session? If this is not possible how can I use arrays or vectors to temporary store my checkbox statuses? I guess it's not possible to have one DataGrid have more than one datasource.

View Replies View Related

Dataset Gather Record

i have a dataset that has say 3 cols (id,name,marks). i want to calculate sum of all marks by traversing all rows in dataset.

like ,
sum = 0;
val = Ds.Tables[0].Rows.Count;
for (int i = 0 ; i< val; i++)
{
sum = sum + Ds.Tables[0].Rows[i].ItemArray["marks"].ToString()
}

but i am getting error in underlined position .

View Replies View Related

Dataset Data To Variable Trouble

i need to use the returned value from a database in my code. it is not to be displayed on a aspx page. I can connect to a database and return the one value i want using SQL SELECT.....FROM.....WHERE...... condition. this is returned as a dataset.

Is there anyway i can return this value from the database as its real value as there is only 1 record? If not how can i retrieve this 1 value and use it in my code? Do i need to loop through the dataset and return it as a string? I want to retrieve 4 values from 4 difference database tables and them up in my code and then return the total value to a different database table.

View Replies View Related

Problem Maintaining Dataset In Session Variable

I have a web interface where the user types in ID's one at a time. After an
ID is typed in, a button is clicked and the button click event has code that
does a query and returns a data reader and then appends the data to a
dataset that is built in the Page_Load code in the if(!isPostBack) block.

When I try to add a row in the button click event code I get an error saying
that "Object reference not set to an instance of an object". I'm saving the
dataset in a Session object and then restoring it in the else clause of the
if(!isPostBack) block. I've pasted code below, please help. I'm relatively
new at asp.net development but have lots of asp and ado experience. Code:

View Replies View Related

Vertical Table Alignment Issue With Dataset Returned

I have two tables: one table forms the header columns and the other table is in an iframe returning the results of an sql query. The query works fien and returns the appropriate data but the rendering of the columns in the top table does notmatch those in the iframe table, even though they are supposed to be the same width!!

The iframe table has a scroll bar and the data returned sizes each column cell
dependant on the amount of data returned regardless if i stipulate a set width!!

As you can imagine this is visually poor as the table columns are not correct for both tables!!

View Replies View Related







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