Jump to content

chaw12

Members
  • Posts

    5
  • Joined

  • Last visited

chaw12's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Hi, if your using a loop you could do this For each datarow in dataset.tables("").select("","TmpPoints DESC")Next
  2. Hi, Currently i have a system that produces an excel report that has a chart on it. i don't have a problem creating the source and adding the chart.But, I cant insert the chart at the last usedrange of excel. Can somebody please help me of how I can insert the chart dynamically at every last used range of excel sheet. VB.net 2010 is my interface. Thanks in advance!
  3. Hi First, i know how to add column in dataset programmatically. But, I'm having a hard time sorting the Data from the created column in the dataset. Example: Original Data of a DatasetPerson Points Emp1 1Emp2 1Emp1 1 On runtime, Person Points TmpPoints<--- created column during runtime(TmpPoint is Sum by Person)Emp1 1 2Emp2 1 1Emp1 1 2 Now, Also on runtime i want the dataset to sort in Descending order using the TmpPoints. Below should be my desired output. Person Points TmpPointsEmp1 1 2Emp1 1 2Emp2 1 1 Some Hint? Thanks.
  4. Yes, your right 10,000 rows taking that much time to process is actually killling me. Specially that the system has to process sometimes up to 500,000 rows with 52 columns. I actually don't know what kind of approach i will make. Ill try your suggestion and thanks for your reply.
  5. Hi Members, Currently, i am uploading a file from excel going to Sql Server with the help of VB.net as my front end. My approach is by making use of a stored procedure.So, from excel file i make use of a Datatable, where I loop in the excel file and stored every rows and columns to Datatable then once all the rows and columns are collected inside the Datatable, I will now pass the Datatable going to stored procedure which resides on the server. my problem is, it is taking a lot of minutes if i am going to upload an excel file containing 10,000 rows. can someone give me an insight on how could i make it a lot faster. Below would be my sample code. Dim OutletUploadRec As New Tbl_OutletUpload Private sub Form1 Dim myTmpDT as new datatable For i as integer=4 to excel.usedrange.rows.countWith myTmpDT .Rows.Add( _ Trim(xlWS.Range("A" & iDx).Value), _ Replace(xlWS.Range("B" & iDx).Value, "", "0"), _ Trim(xlWS.Range("C" & iDx).Value), _ Trim(xlWS.Range("D" & iDx).Text), _ Trim(xlWS.Range("E" & iDx).Text)End withnext OutletUploadRec.AppendFiledataServerSide(myTmpDT) end sub Public Class Tbl_OutletUpload Function AppendFiledataServerSide(ByRef DT As DataTable) As DataTable If myConn.State = ConnectionState.Closed Then myConn.Open() Dim myCommand As New SqlCommand("[dbo].[AppendTblFileDatas]", myConn) With myCommand .CommandType = CommandType.StoredProcedure .Parameters.AddWithValue("@TblFileData", DT) .ExecuteNonQuery() End With myCommand.Dispose() myConn.Close() Return DT End Function end Class i assigned OutletUploadRec to inherit the functions i created inside the Class Tbl_OutletUpload. AppendFileDataServerSide
×
×
  • Create New...