Create Serial Number. Visual Basic.NET Forums on Bytes. I have a windows app using vb.net 2005. I would like to create a serial number based on a couple of characteristics of the customers computer (computer name, HD number.etc). In my applicattion, I used an encrpted string based on a number of features of the user machine and my.
![]() Apr 11, 2012 ![]()
OS: windows 7 64-bit /Programming Language: Visual Basic.net on Visual Studio 2010 express edition.I have dataset with 4 tables each one of them is a datasource to a datagridview I want to add a serial number column to the datagridview so I made this
DataGridView1.Columns.Add('serial', 'SER.') For x As Integer = 0 To (ds.Tables('workers').Rows.Count - 1) DataGridView1('serial', x).Value = (x + 1) Next It was working fine untill I added a relationship to the dataset the relationships codes were Dim relation_WC As New DataRelation('relation_WC', ds.Tables('workers').Columns('id'), ds.Tables('cources_jun').Columns('workerid')) Dim relation_WV As New DataRelation('relation_WV', ds.Tables('workers').Columns('id'), ds.Tables('vacations_jun').Columns('workerid')) [code].... I breaked point the debuging and I found that the serial number column I added is fine and has it's values, but when I reach the line relations.add(the_relation) the serial number column loses it's values and turn into an empty column with no numbers in it....why this is happening? Note: I added another relations but the only relations that clear the serial number column are the relations that has a datatable that is a datasource to the datagridview that has the serial number column.
I try to filter my datagridview with a datetimepicker. When the datetime value is just date (eg.15/5/2010) everything work fine. But when there is also date and time value occurs conversion problem 'conversion failed when converting date and/or time from character string'. Iused also combobox populated with the dattime values but i confronted the same problem.. My goal is to calculate the average readings of a meter. Every next reading is equal to the previous one plus the last period consumption (energy meter). First I calculate the difference between the two readings (which correspond to the dates user choose from the combobox). Next I find the number of readings which are between the two dates.That s my code:
PLEASE help!
If you are not wanting to use the time, you can simply set the dtp's format to ShortDate and it will remove the time.
If you are wanting the time, you will need to do some error checking to make sure the format will match that of the database.
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |