Search Results

Search found 3 results on 1 pages for 'user283897'.

Page 1/1 | 1 

  • Max file size for File.ReadAllLines

    - by user283897
    Hi, I need to read and process a text file. My processing would be easier if I could use the File.ReadAllLines method but I'm not sure what is the maximum size of the file that could be read with this method without reading by chunks. I understand that the file size depends on the computer memory. But are still there any recommendations for an average machine? I would greatly appreciate your fast response. Thanks, Lev

    Read the article

  • DataTable Filter mystery

    - by user283897
    Hi, could you please help me find the reason of the mystery I've found? In the below code, I create a DataTable and filter it. When I use filter1, everything works as expected. When I use filter2, everything works as expected only if the SubsectionAmount variable is less than 10. As soon as I set SubsectionAmount=10, the dr2 array returns Nothing. I can't find what is wrong. Here is the code: Imports System.Data Partial Class FilterTest Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Call FilterTable() End Sub Sub FilterTable() Dim dtSubsections As New DataTable Dim SectionID As Integer, SubsectionID As Integer Dim SubsectionAmount As Integer Dim filter1 As String, filter2 As String Dim rowID As Integer Dim dr1() As DataRow, dr2() As DataRow With dtSubsections .Columns.Add("Section") .Columns.Add("Subsection") .Columns.Add("FieldString") SectionID = 1 SubsectionAmount = 10 '9 For SubsectionID = 1 To SubsectionAmount .Rows.Add(SectionID, SubsectionID, "abcd" & CStr(SubsectionID)) Next SubsectionID For rowID = 0 To .Rows.Count - 1 Response.Write(.Rows(rowID).Item(0).ToString & " " _ & .Rows(rowID).Item(1).ToString & " " _ & .Rows(rowID).Item(2).ToString & "<BR>") Next SubsectionID = 1 filter1 = "Section=" & SectionID & " AND " & "Subsection=" & SubsectionID filter2 = "Section=" & SectionID & " AND " & "Subsection=" & SubsectionID + 1 dr1 = .Select(filter1) dr2 = .Select(filter2) Response.Write(dr1.Length & "<BR>") Response.Write(dr2.Length & "<BR>") If dr1.Length > 0 Then Response.Write(dr1(0).Item("FieldString").ToString & "<BR>") End If If dr2.Length > 0 Then Response.Write(dr2(0).Item("FieldString").ToString & "<BR>") End If End With End Sub End Class

    Read the article

  • Using MicrosoftReportViewer with Web Forms programmatically

    - by user283897
    Hi, I'm repeating my question because the prior one under this topic was lost. Could you please help me? I want to use MicrosoftReportViewer for Web Forms so that the DataSource be set programmatically. There is some sample code on the Internet for Windows Forms but I haven't found anything for Web Forms. For example, here is some code I've tried to use. It gives no errors but nothing is displayed. How should I modify the code to display a table in the ReportViewer? Imports System.Data Imports Microsoft.Reporting.WebForms Partial Class TestReportViewer Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load CreateReport() End Sub Sub CreateReport() Dim dt As DataTable Dim rpt As ReportDataSource dt = New DataTable("Sample") With dt .Columns.Add("No", GetType(Integer)) .Columns.Add("Name") .Rows.Add(1, "A1") .Rows.Add(2, "A2") .Rows.Add(3, "A3") .Rows.Add(4, "A4") .AcceptChanges() End With rpt = New ReportDataSource rpt.DataMember = "Sample" rpt.Value = dt rpt.Name = "test" With ReportViewer1 .LocalReport.DataSources.Add(rpt) .DataBind() .LocalReport.Refresh() End With End Sub End Class

    Read the article

1