Click here to Skip to main content
15,891,473 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Tunnel in Visual Basic 6.0 Pin
Dave Kreskowiak20-Mar-06 2:46
mveDave Kreskowiak20-Mar-06 2:46 
QuestionBenefits of .Net Pin
Chandan_Kr16-Mar-06 21:31
Chandan_Kr16-Mar-06 21:31 
AnswerRe: Benefits of .Net Pin
Dave Kreskowiak17-Mar-06 2:39
mveDave Kreskowiak17-Mar-06 2:39 
QuestionHow to tacke which object still using the image file? Pin
cylix200016-Mar-06 21:07
cylix200016-Mar-06 21:07 
AnswerRe: How to tacke which object still using the image file? Pin
Dave Kreskowiak17-Mar-06 2:37
mveDave Kreskowiak17-Mar-06 2:37 
Questionalternative for handles button1.click,.................. Pin
mamatharaghu16-Mar-06 18:12
mamatharaghu16-Mar-06 18:12 
AnswerRe: alternative for handles button1.click,.................. Pin
CWIZO16-Mar-06 20:56
CWIZO16-Mar-06 20:56 
Questiongenerating more than one dataset based upon parameter passed Pin
uglyeyes16-Mar-06 16:42
uglyeyes16-Mar-06 16:42 
Hi All,

I have posted this message before as well but i am having trouble coding it the response to my previous post was


Performance will suffer each time you have to go back to the database to get the records you need.
Your best shot is to use a DataView on your DataTable so it returns all the records with at ID.
It's a different View of the table. DataViews can be reconfigured quickly so...

What you'd probably do is
1. retrieve a small table with all the UNIQUE (hint, hint) ID's you're going to use,
2. then retrieve all the records that contain all the ID's you want in a seperate table.

3. Now, you'll iterate through the first table, with the ID's, and use each, one at a time,
to build a DataView on the second table that will return only the records with that ID.
You can then use the data in that DataView to bind to your control.

Dim dv As New DataView(dataTable)With dv
.AllowDelete = False
.AllowEdit = False
.AllowNew = False
.RowFilter = String.Format("ID='{0}'", idToFind)
.Sort = "CompanyName DESC"End With' Bind you control to this DataView


--------
so far i have coded...

**************************
'select the table with only distinct ID based
cmd = New SqlCommand("select distinct measure_id from measuredata m, textdata t where t.ScoreCardId = m.ScoreCardId", objConn)

Dim da As SqlDataAdapter = New SqlDataAdapter(cmd)
Dim dtId As New DataTable("MeasureId")

da.Fill(dtId)
'DataGrid1.DataSource = dtId
'DataGrid1.DataBind()


'select all columns with ID
Dim cmd1 As SqlCommand = New SqlCommand("select * from measureData", objConn)

Dim da1 As SqlDataAdapter = New SqlDataAdapter(cmd1)
Dim dt As New DataTable("MeasureSource")

da1.Fill(dt)

Dim myView As New DataView(dt)
Dim rowview As DataRowView
For Each rowview In
myView.RowFilter = String.Format("ID='{}'", dtId.Columns.Item("measure_Id"))
Next rowview



'DataGrid2.DataSource = dt
'DataGrid2.DataBind()
****************************

now i dont know how to do the 3rd one. Please note. i am not looking for a whole block of data in one go. i need to seperate each chunk of data and bind it to my webcontrol so that based on each ID it will create a web chart.if there is 4 IDs it will create 4 web charts and displayed in page load.
so i will be looking for a each set of data for each ID like

webchartControl1.datasource = dataset(@from ID 1)
webchartControl2.datasource = dataset(@from ID 2) and so forth.

#actualy i also want to instanciate webchartControl too if there is more data avaialble instead of having lots of instances hardcoded. just dont know how to do that.

and hardest bit is

#those all charts are going back in repeater. and those charts are populated in each row based upon their parent ID.


Its a lots of task, I will be really happy if any of you know a software that does those stuff happy to buy one and save time.

many thanks in forward.
robin
QuestionIssue updating Listview via Thread Pin
mechman16-Mar-06 13:03
mechman16-Mar-06 13:03 
AnswerRe: Issue updating Listview via Thread Pin
Dave Kreskowiak17-Mar-06 1:47
mveDave Kreskowiak17-Mar-06 1:47 
GeneralRe: Issue updating Listview via Thread Pin
mechman17-Mar-06 3:14
mechman17-Mar-06 3:14 
GeneralRe: Issue updating Listview via Thread Pin
mechman17-Mar-06 3:17
mechman17-Mar-06 3:17 
GeneralRe: Issue updating Listview via Thread Pin
Dave Kreskowiak17-Mar-06 7:25
mveDave Kreskowiak17-Mar-06 7:25 
GeneralRe: Issue updating Listview via Thread Pin
mechman17-Mar-06 7:53
mechman17-Mar-06 7:53 
GeneralRe: Issue updating Listview via Thread Pin
Dave Kreskowiak17-Mar-06 12:37
mveDave Kreskowiak17-Mar-06 12:37 
GeneralRe: Issue updating Listview via Thread Pin
mechman18-Mar-06 6:04
mechman18-Mar-06 6:04 
GeneralRe: Issue updating Listview via Thread Pin
Dave Kreskowiak18-Mar-06 6:24
mveDave Kreskowiak18-Mar-06 6:24 
GeneralRe: Issue updating Listview via Thread Pin
mechman19-Mar-06 7:30
mechman19-Mar-06 7:30 
GeneralRe: Issue updating Listview via Thread Pin
Dave Kreskowiak19-Mar-06 14:22
mveDave Kreskowiak19-Mar-06 14:22 
GeneralRe: Issue updating Listview via Thread Pin
mechman19-Mar-06 14:27
mechman19-Mar-06 14:27 
GeneralRe: Issue updating Listview via Thread Pin
Dave Kreskowiak19-Mar-06 16:51
mveDave Kreskowiak19-Mar-06 16:51 
GeneralRe: Issue updating Listview via Thread Pin
mechman19-Mar-06 18:05
mechman19-Mar-06 18:05 
GeneralRe: Issue updating Listview via Thread Pin
Dave Kreskowiak20-Mar-06 2:48
mveDave Kreskowiak20-Mar-06 2:48 
QuestionMaking a grid on a MDI form or regular form Pin
Quecumber25616-Mar-06 9:03
Quecumber25616-Mar-06 9:03 
Questionhow can i capture printer's jobs Pin
fahad ahsan16-Mar-06 7:34
fahad ahsan16-Mar-06 7:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.