|
Ideally I would also requery the database (and normally would), but in this case I need to load a subset of data from the database, make some changes to it and when the user is happy with the changes, submit them back.
Thanks for the help and advise
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
I failed to mention two wonderful classes that you can use to do what you want quickly, one is dataset and the other is dataview and they should not be overlooked because they can help you out.
Public Class DataView
Inherits System.ComponentModel.MarshalByValueComponent
Member of: System.Data
Summary:
Represents a databindable, customized view of a System.Data.DataTable for sorting, filtering, searching, editing, and navigation.
Public Class DataSet
Inherits System.ComponentModel.MarshalByValueComponent
Member of: System.Data
Summary:
Represents an in-memory cache of data.
|
|
|
|
|
That was (or still is) the problem, Steve has a dataset with 2 datatables that he wants to query with a join. There is no real support within the dataset/datatable/datarelation world to do this easily.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Lets see if I can think this through ...
We point / read a dataset (call it dsOne) to a table from your SQL? server.
We point / read a second dataset (call it dsTwo) to another table from your SQL server.
We point a dataview (call it dvOne) to dsOne
We do a sort on dvOne on PLSupplierAccountID
We pull the first entry for PLSupplierAccountID in dvOne
We point a second dataview (call it dvTwo) to dsTwo
We use the entry from dv.One SupplierAccountID to do a dvtwo.Find
If we get a match we combine the row entry from dvOne with dvTwo in a DataGrid
Once you get all the matches combined in the datagrid, you can make your changes using your form.
These changes will be stored on the form until you "submit" them back to your SQL server using a update query.
This sound about right to you?
|
|
|
|
|
Sometimes life's a bitch.....
Just a thought, would linq help? I have only played with it briefly, but it might be worth a look?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I've not even had time to look at LINQ, but I think I will make the time.
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
Looks interesting! I will have to play with this!
|
|
|
|
|
Hi,
we have a strange problem. A VB.net 2005 (.net 2.0) application runs on many WinXP clients and accesses a central DB (MaxDB 7.5.0.26, it's an open source DB by SAP) on a server. It works fine for all clients except for one of them. By the help of a profiler we found out on this client that every call of the VB command "myOdbcConnection.Close" needs about 2 seconds, which completely slows down the application (it only opens the connection when needed and afterwards closes it right away, which works fine on all the other clients). (The odbc driver is MaxDB 7.5.0.26.)
The client runs on WinXP SP3, the same problem occurs if SP3 is deinstalled and only SP2 is avaiable. We also deactivated the anti virus program ("F-secure") and the firewall - problem remains the same. Not only .net 2.0 (2.0.50727) is installed on the client but also .net 3.0 (need by another program). We deinstalled .net 3.0 - problem remains the same. ("Shared Add-in Extendability Update for Microsoft .NET Framework 2.0" and "Shared Add-in Support Update for Microsoft .NET Framework 2.0" are also installed on the client.) -- That is, we do not have any idea anymore what we could check ...
What could be wrong with the client? What should we have a closer look at?
Thanks in advance for help.
Kind regards,
Michael
|
|
|
|
|
I would check the versions of the odbc dll's between the problem machine and a good one. That has caught me out in the past.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
"Unfortunately" the files belonging to the ODBC driver are identical between the "bad" and a "good" client.
Michael
|
|
|
|
|
i have a program that works fine. i created a window service that work. when i copied the code to the winservice. a triger timer enable in the onstart method triger a call to the method processmail.
if i start the service from window manage. i reicieve the error" the myservice in local computer started and stopped. some services stop automatically. if the have no work to do for example the performance logs and alert service.
when i start it from vs ide "could not perform the requested operation for service on machine plp11"
can someone over help
|
|
|
|
|
Ebube wrote: when i start it from vs ide "could not perform the requested operation for service on machine plp11"
You cannot run a service from the ide. In the onstart event of the service put a thread sleep to allow you time to connect from the ide (DEBUG>ATTACH TO PROCESS) This may give you some clue as to what is happening
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi,
Does anyone know the download site of the tool Spy++?
Thanks,
Andy
|
|
|
|
|
No, it comes as part of the VS intallation, but a quick google shows there are many similar tools available FOC
Bob
Ashfield Consultants Ltd
|
|
|
|
|
when we are in pop up window ,i don't want any action to take place unless i have closed the pop up window and back to the master page. How to do that?
|
|
|
|
|
|
Stop posting the same question over and over in multiple forums. If you learned to explain yourself someone would answer your question. As you have posted this in VB and ASP forums are you writing a windows application or a web based one. If its a windows app then FORM.ShowDialog() will do it, but PLEASE stop posting the same useless question over and over!!!!!!!!!!!!!!!!!
Bob
Ashfield Consultants Ltd
|
|
|
|
|
when we are in pop up window ,i don't want any action to take place unless i have closed the pop up window and back to tye master page. How to do that?
|
|
|
|
|
Hi,
I have aplication that has datagridview, I need create 9000 columns by this code
Dim i As Int32
For i = 1 To 9000
Dim colX As New DataGridViewTextBoxColumn
colX.HeaderText = i.ToString
colX.Name = "txt"
colX.FillWeight = 1
colX.Dispose()
'colX.AutoSizeMode = DataGridViewAutoSizeColumnMode.None
DataGridView1.Columns.Add(colX)
Next
But it very very slowly (to end this code it takes a long times(about 2 hour)
Please tell me how to create it quickly
Thanks for support !
This will appear at the end of articles you submit to the Code Project
modified on Friday, June 13, 2008 4:02 AM
|
|
|
|
|
9000 columns in a DataGrid view!!!!?
First thing I would do is review your program design. Why would you want 9000 columns?
How can 9000 columns fit on a screen and make any meaningful sense to anyone?
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
you mean 9000 rows !!!
Microsoft didn't take in consideration that one day a developer will use 9000 column !
|
|
|
|
|
Lord Hasan wrote: you mean 9000 rows
I would have thought so, but his code is generatinmg columns - slowly!
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Yes, It very very slowly, it take a long (about 2 hours) to create 9000 columns
This will appear at the end of articles you submit to the Code Project
|
|
|
|
|
No, I need to create 9000 column
This will appear at the end of articles you submit to the Code Project
|
|
|
|
|
What kind of dataset do you have which contains 9000 fields? Maybe there is a more appropriate control as I think that 9000 columns is beyond the scope of a datagridview control.
|
|
|
|