DataSource Controls :: Almost 2 Seconds To Read A Datareader Field

Apr 16, 2010

I use a SqlDataReader to get fron sqlServer a row af a table. This table have a text field where I store a Xml configuration. In one case this Xml grow up to 650Kb. When I get the field from the datareader it cost amost 2 seconds:

INFO 2010-04-16 09:46:40,559 [12] Cms.dataContenido - readed
INFO 2010-04-16 09:46:42,356 [12] Cms.dataContenido - XMLContent

This is my code:

[Code]....

View 1 Replies


Similar Messages:

DataSource Controls :: DataReader.Read() Not Working?

Mar 16, 2010

I have used SqlDataReaders a million times. Someone, what is wrong with this code:

SqlConnection connection = new SqlConnection(connectionString);
try
{
connection.Open();
SqlCommand command = connection.CreateCommand();

[Code]....

I have checked this against similar classes and it is exactly the same, but this one doesn't work.

View 4 Replies

DataSource Controls :: Retrieve Text Field Using Datareader

Feb 25, 2010

I have text field on a sql server table and I retrieve it on string variable using datareader : string result = reader["MyTextfied"] but I have this errors ( text or binary field cannot be troncated ) My text fied contains a large of text

View 5 Replies

DataSource Controls :: Manage A Datareader With Data Field?

Mar 25, 2010

i have a datareader who read from data field from sql server, this field is datetime format now, when this field is null it returns 01/01/1900!! how can i manage it without if or some check, is there a property in datareader or sqlserver properties who i can return null value from datetime field?

View 4 Replies

DataSource Controls :: Use A DataReader With SQL?

Mar 29, 2011

I have put a SQLDataSource on my page and everything is adjusted and it works properly. I read an article
here which was indicating that you can use a DataReader in order to get data from sqldatasource, but it doesn't say how, the only thing that is said is to use DataSourceMode property in order to adjust it for a DataReader.

View 1 Replies

DataSource Controls :: Get Profiles From Timestamp - 20 Seconds?

Mar 17, 2010

I have a issue im trying to get though where my site while up useing a ajax timer ever 15 seconds to update there time stamp to say there still online and active. Its the best way i could think of to handle the are they online/did they just leave issue i was having. Any ways i dont know how to query the database with linq to sql so i guess i will do psudeo code like stuff and hopefully some one can offer some advice.

[Code]....

View 1 Replies

DataSource Controls :: How To Load A DataReader

Apr 21, 2010

How do I load a datareader in a defult.aspx page using while using a database connection that is defined in the web.config file?

View 3 Replies

DataSource Controls :: Retrieve Data From Database On Every Seconds?

Feb 4, 2010

I'm developing a web application with ASP.net and Sql Server 2005.

How i can retrive data from database on every seconds basis?

For your information , I have a Server application which will update hardware status (every seconds) into database and

my web client need to retrieve and display out the latest status (every seconds)

View 1 Replies

ADO.NET :: DataReader Or DataSet To Read An Output Parameter Not Essential?

Nov 4, 2010

I always thought we had to use a DataReader or a Dataset to read a given SQL data but i realized that it is not necessary to use them to read an SQL Output Parameter(im not a SQL expert).

View 1 Replies

DataSource Controls :: Create ConnectionString Using SQL DataReader

Sep 11, 2010

why this first connection works but the second doesn't?

[Code]....

I'm trying to use <asp:FileUpload> to upload images and as far as I know you have to use <asp:SqlDataSource> to do it but I need to create the connections string using entries stored in a database.

View 2 Replies

DataSource Controls :: DataReader Telling Me It Needs To Be Closed

Jun 28, 2010

Dim sqlc1 As New SqlCommand("sp_navmenu 275,1,21", ERIKSDbCon)

View 4 Replies

DataSource Controls :: How To Evaluate Nothing Value Returned By Sql Datareader In Vb.net

Aug 24, 2010

When a sql query returns NULL , I can use the following code to evaluate:

[Code]....

When a sql query returns nothing, neither IsDBNull nor is Nothing works. I don't know why some sql queries return null while some return nothing when there are no data returned. But anyway, can somebody tell me how to evaluate nothing value returned in sql datareader in vb.net? When I put the cursor over signInfo variable in debug mode, I can see Nothing show as its value. But the line does not work

[Code]....

View 3 Replies

DataSource Controls :: How To Convert Datareader To Dataset

May 11, 2010

Any one can suggest a method to convert Datareader to dataset or any alternate method

View 7 Replies

DataSource Controls :: DataTable With DataReader Not Working?

May 17, 2010

dataTable with dataReader not working

[Code]....

View 3 Replies

DataSource Controls :: Datareader - Loop Through Results In VB?

Feb 1, 2010

I would like to loop through my result set and generate a menu structure like this:

pagetitle
pagetitle
subtitle
subtitle
pagetitle
pagetitle

So far I have the following code but it doesn't generate the menu?

While reader.Read()
' set title
sitetitle = reader.Item("siteName")
mydata &= reader.Item("pagetitle")
' check subtitle exists, if so, build menu, loop though subtitles somehow?
if not IsDBNull(reader.Item("subtitle"))
mydata = "<ul>"
mydata &= "<li>" & reader.Item("subtitle") & "</li>"
mydata &= "</ul>"
end if
End while

Qeury and result set below:

sql:

SELECT subpages.subpageid, pages.pageid, sites.sitename, sites.siteid, pages.siteid,pages.pagetitle, subPages.subtitle FROM pages LEFT JOIN sites ON pages.siteid = sites.siteid LEFT JOIN subpages ON subpages.subpageid= pages.pageid WHERE sites.siteID = 1 ORDER BY sites.siteid, pages.pageid, subpages.subpageid ASC

results:

subpageid | pageid | siteid | siteid | pagetitle | subtitle
NULL 1 SCHS 1 1 Sandwell Community Healthcare Services NULL
NULL 2 SCHS 1 1 About Us NULL
NULL 3 SCHS 1 1 Your Services NULL
4 4 SCHS 1 1 Equality and Diversity Team at SCHS 1111
4 4 SCHS 1 1 Equality and Diversity Team at SCHS 2222
4 4 SCHS 1 1 Equality and Diversity Team at SCHS 333
4 4 SCHS 1 1 Equality and Diversity Team at SCHS 44444
NULL 5 SCHS 1 1 Single Equality Scheme NULL
NULL 6 SCHS 1 1 Diversity Strands NULL
NULL 7 SCHS 1 1 Equality Impact Assessments NULL
NULL 8 SCHS 1 1 Quality and Safety Committee NULL
NULL 9 SCHS 1 1 Contact Us NULL

View 5 Replies

DataSource Controls :: There Is Already An Open DataReader Associated With This Command Which Must Be Closed First.

May 27, 2010

protected void Page_Load(object sender, EventArgs e)

View 7 Replies

DataSource Controls :: Reading With DataReader Into List And OutOfMemoryException

Sep 23, 2010

I'm Using a DataReader to Read about 100,000 records, my code look like :

[Code]....

I have a per row computation in reading the rows on GetMyType2Info() method, and this method also another method that I return only one record by ExecuteReader(). the problem is that when the MyTypeList (List<T>) has about 21,000 Items of MyType (<T>) System.OutOfMemoryException is thrown. wanted to know how to resolve this and wanted to know more about the maximum size of List<T> capacity. in addition the execution of the main Query with 100,000 records take about 4 seconds in SQLServer a record has only types of nvarchar , float,datetime and int

View 1 Replies

DataSource Controls :: ODBC Datareader Is Not Working With DB2 Some Tables?

Jun 2, 2010

This is the code i am used for fetching data from DB2 server (windows based server)In the same server tables created by me is working fine...eg:

oCommand.CommandText = "SELECT * from DEB.TESTUSER";

below is a table created by another application but the data reader is not working with this query ( table in the same server with same DB as above)

oCommand.CommandText = "SELECT * FROM DEB.RULE_GROUP";

If any permission or any other things i want to check .....i mean security related.....odbcadapter is also working fine....pls help regarding the datareader.....below is the complete code......

private void btnSelectRecord_Click(object sender, EventArgs e)
{
OdbcConnection oConnection = null;

[code]...

View 3 Replies

Web Forms :: Datareader Error: Invalid Attempt To Read When No Data Is Present

Apr 3, 2010

I am getting the following error when i am trying to assign values to controls on form via datareader, i know i got one row. but this particular field has no data in it.

I do have lot of other forms where i use the same style

getting this error: invalid attempt to read when no data is present

on this line: If gDatareader("CutoffDate") Is DBNull.Value Then

View 4 Replies

Data Controls :: How To Make Bound Field And Template Field Read-Only In Edit Item Template Of GridView

Jul 31, 2013

i am implementing a update query module.i am displaying all fields from a table for a term searched. well now i am implementing update option for the record which are displayed, i have like 70 columns in my table, and i want to know how to restrict some selected fields to be only read only while the form can be updated ?Like if user select to update a record then some selected field such as "Timestamp, UID etc some selected fields" remains READ ONLY !

View 1 Replies

ADO.NET :: Getting DataReader Field Text To System.Collections.IEnumerator

Feb 22, 2011

cmd_again =
new
SqlCommand
();
cmd_again.CommandText =
"select * from QMS_Processes1 where QMSParentProcessId=" +
id + ";"
;
cmd_again.CommandType =
CommandType
.Text;
cmd_again.Connection = con_again;
rdr_again = cmd_again.ExecuteReader();
System.Collections.
IEnumerator
ienum = rdr_again.GetEnumerator();
while
(ienum.MoveNext())
{}

now i want 3 fields in datareader how do i get that?? i tried to create instance of System.data.common.dataRecordInternal..but it didnt happen.

View 4 Replies

ADO.NET :: Reading A Segment Of Huge Varbinaty (max) Field By DataReader

Oct 19, 2010

I have a table with just a column and a row in a table that it save just a file with size 1.5 GB ! C# application and sql server are in different machines. I want to read that file by DataReader every 100 MB then save all 100 MB files to disk by "FileMode.Append" for file stream and collect them to one file.

View 1 Replies

Web Forms :: Datareader: Set Multiple Random Images Into Appropriate Image Field

Sep 3, 2010

first of all, sorry if my title isn confusing as i dont really sure the specify description regarding what i wan to do. Now what i trying to do is, I getting 5 random images from the database, this is the code for me to get random 5 records from database:

[Code]....

I dont really know how to use array but willing to try if it is needed.

View 1 Replies

DataSource Controls :: Ignore Empty Field Because Always Join The Field And Separate By Space

Mar 3, 2010

I wanna join all the field as a new col.

but how can i ignore the empty field because i always join the field and separate by space like the following.

select (field_1+' '+field_2+' '+field_3) as new_col from TABLEA

but if the field is empty, then there is the double space

how can i ensure all the space is one space only.

View 2 Replies

DataSource Controls :: Set Field As DBNull.Value If Field Is Blank?

Apr 7, 2010

I have a 20 to 30 fields on a form. Most of them are optional. However, the users can fill out what they want. If a user dosen't fill in a field when data is sent to the database it's sent as blank, instead of NULL. Is there a way I can generically say "for all textboxes if Equals("") then DBNull.Value". Without going through each and every textbox?

View 2 Replies







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