You nailed it Mike!!! Works like a champ. Now I need to find out what bunwad took the datasource and member out of my binding source. I absolutely could not have been me. I swear to God!!!
Printable View
You nailed it Mike!!! Works like a champ. Now I need to find out what bunwad took the datasource and member out of my binding source. I absolutely could not have been me. I swear to God!!!
Naaa.... was probably the whyskie :rolleyes:
Whiskey would never do that to me. It was some bunwad who sneaked in and took out the settings while I was doing something else. Anyway man, you performed a miracle here. Have you thought about applying for Jesus's job?
Anyway i took the time to do some reshearch on this, i have been usint that metothe for a long time, and when something works, i move one to something else, now that i read a litle more about it aparently everyone recoments to use the datatable not the binding source, so i will post some code here, give a few minutes.
This does produces the same result and as far as i read on the matter its the recomended way to do it:
Code:
Dim YourTable As DataTable = YourDataSet.Tables("YourTableName")
Dim New_Row As DataRow = YourTable.NewRow
With New_Row
.Item("ColumeName") = "To your value"
End With
YourTable.Rows.Add(New_Row)
That looks suspiciously similar to this:
Not exactly the same, but similar. I do know that you can do it this way without worrying about the binding sources.Code:Dim NewTrainingRow As _MasterBase4_0ItemMasterDataSet.tblChangeTrainRow
NewTrainingRow = _MasterBase4_0ItemMasterDataSet.tblChangeTrain.NewtblChangeTrainRow()
NewTrainingRow.intChangeID = glbintCRNum
NewTrainingRow.StrName = _MasterBase4_0ItemMasterDataSet.tblEmployee(intCountRow).strFullName
_MasterBase4_0ItemMasterDataSet.tblChangeTrain.Rows.Add(NewTrainingRow)
Yes, it is similar to that, from what i have been reading its a better aprouche, i have been using the other code i give for a couple of time, never had trouble with it, so i was kinda, how the is that happening? It took me a while to figure it out, couse from the previews posts i had the impression you draged the objects in designer, soo they have it's properties set by default.
You can also get it done like this:
But since you will be getting the values from a binding source or aternatively from a datagridview, it would become a pretty long line of code what is complicated to review and understandCode:Dim rw = YourTable.Rows.Add(
New Object() {Nothing, "Value 3"})
I think I am going to use both approaches. I am also going to stick them both into my Code snippets file.
No, I did not drag them in. I got the binding sources from the tools window and you have to set them when you do that. Obviously someone came in and took my settings out since I would never forget to do that.
Lol....
As a matter of curiosity, Access database:
https://support.office.com/en-us/art...8-98c1025bb47c
If you think 10Gb database in SQL its too litle, the you gona have a stroke when you look at the above.
I couldnt precise this couse i dont work with any of the programs contained in Office Suite.
That figures. They are out to get us all and squeeze us dry. I have started looking at the SQL. That is going to take a little while. The damn thing is confusing as hell with it's field datatypes and what has pissed me off so far is that once I save a table the damn thing won't let me go back in and change the datatypes! I am sure there is a way around that, but I haven't looked at this enough to have any idea how. By the way, there appears to be no Boolean datatype. I like those and use them quite a bit. Seems like everything you do ends up being a compromise. Kind of like marriage except instead of compromise it is capitulation.
Boolean = bit (have seen some other ways, this is what i use) pretty strait foawrd vs will create a check box for it.
Change datatypes you need to change a setting:
https://imgur.com/a/upImb
Now, you need to know that using that off, can couse loss of data if you attempt to change something on a table that has already data in.
Usefull sites:
http://www.tutorialspoint.com/sql/
https://www.w3schools.com/sql/
Sql datatypes:
https://docs.microsoft.com/en-us/dot...-type-mappings
Thanks Mike. I already bought some books and am not happy with any of them.
By the way, while I was reading some of the material I got yesterday I saw where the text datatype is going to be phased out and it is suggested that it not be used anymore. FYI
Yeah that was my plan. Since I am just starting I will start text datatype free. Also, I found the Boolean datatype (thanks to your info). It is the bit datatype. Whew!
And the link i posted https://imgur.com/a/upImb , you have to uncheck that to be able to change the datatypes.
And im off for today, just finish what i was doing, enjoy your reading
Damn, I went all through the options and never did see that. Thanks, I needed that.