
PlayKid
Avatar/Signature-
Posts
38 -
Joined
-
Last visited
PlayKid's Achievements
Newbie (1/14)
0
Reputation
-
Dear all, I would like to know how to set certain rules for my database relationships with parent and child tables, such as cascade, restrict.... I am using SQL Server, but I cannot find a way to accomplish this task, I am using VB.Net to design my application, using VB.Net to view my database relationship is okay, but I didn't see anything like Delete Rules, Update Rules, etc for me to select, where should I go? Thank you very much PlayKid
-
No, this is not what I mean, I am populating the combobox by dataview, and it automatically populate the data onto it, since I am not adding it manually, so your code is not what I want. But thanks for your replying. PlayKid
-
Dear all, I am trying to filter data by using dataview and display the results on the combo box, but the problem is it displays more than 1 exactly the same results on a combo box, how can I do it to prevent this happned? Thanks PlayKid
-
Possible to read a specific line on a text file?
PlayKid replied to PlayKid's topic in Directory / File IO / Registry
Yip, I am on it....... Thanks -
Yes, I did, but when I clicked the form, the debugger is not responding, what can I do?
-
DateTimePicker Differences in numbers of days problem
PlayKid replied to PlayKid's topic in Windows Forms
Thanks very much, PlausiblyDamp... it works..... it's really help me alot. Thanks PlayKid -
This is one of my method, another method is without the shared, still either ways, they still not working. Is there something wrong with my code?
-
DateTimePicker Differences in numbers of days problem
PlayKid replied to PlayKid's topic in Windows Forms
Here is my code: Private Sub DateReturnTP_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateReturnTP.ValueChanged Dim Difference As TimeSpan Difference = DateReturnTP.Value - DateReturnTP.Value DurationText.Text = Difference.TotalDays.ToString End Sub At this line of code: Difference = DateReturnTP.Value - DateReturnTP.Value The problem arises, it says that Operator "-" not defined for types 'Date' and 'Date'. -
Thanks for all of your replies, here is my code. In Form 1: Private Sub MorepersonButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MorepersonButton.Click Dim MDIChildMCPersons As New MCPersons MCPersons.SupplierNumber = 2 MDIChildMCPersons.MdiParent = ParentForm MDIChildMCPersons.Show() End Sub In Form2: Public Shared SupplierNumber As Integer Private Sub MCPersons_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Label1.Text = SupplierNumber.ToString End Sub And it doesn't doing good. The result is 0 instead of 2.
-
DateTimePicker Differences in numbers of days problem
PlayKid replied to PlayKid's topic in Windows Forms
I tried your method, but it doesn't work, I am using VB.Net. -
Possible to hide columns in the Datagrid?
PlayKid replied to PlayKid's topic in Database / XML / Reporting
Thanks for both of your replies, but I have used another method, here is my code, if there is anyone would like to use as well. ClientDataSet1.Tables("Client").Columns("ClientNo").ColumnMapping = MappingType. -
Dear all, I am trying to calculate the difference between 2 DateTimePickers' values, and I am unable to calculate the differences in numbers of days, it is fine if they both within the same month, but if the month is changed, the problem arise, it just calculated the differences in day and not the month part. Can anyone help me with this? Thank you very much PlayKid
-
Joe: That's part of my idea, but since I have 10 combo boxes that do the same tricks, if I entered something on my box, then all other boxes do the same thing, which overwrites my text that I have entered on my combo box. I have changed my code, here is my updated code, but still gives me unwanted results. The results came back to me is, the item was added to the combo boxes successfully, but in my database, it repeated the item 10 times. it's really killing me, been trying figure out the codes for a week already.... Private Sub ActivitiesInformation(ByVal pActivityName As String) Dim drActivities As DataRow dtActivities = dsActivities1.Tables("Activities") drActivities = dtActivities.NewRow If dtActivities Is Nothing Then ActivityNo = 1 Else ActivityNo = dtActivities.Rows.Count End If drActivities("ActivitiyNo") = ActivityNo + 1 drActivities("ActivityProvided") = pActivityName dtActivities.Rows.Add(drActivities) End Sub Private Sub Combo(ByRef pCombo As ComboBox, ByVal dt As DataTable) Dim dr As DataRow If pCombo.Text <> "" Then dr = dt.NewRow dr("SupplierNo") = SupplierNo + 1 If CheckExistanceInComboBox(pCombo) = False Then Call ActivitiesInformation(pCombo.Text) dr("ActivityNo") = ActivityNo + 1 ElseIf CheckExistanceInComboBox(pCombo) = True Then dr("ActivityNo") = pCombo.ValueMember End If dtSupplierActivities.Rows.Add(dr) End If End Sub Private Sub SupplierActivitesInformation() Dim drSupplierActivities As DataRow dtSupplierActivities = DsSupplierActivities1.Tables("SuppliersActivities") Call Combo(ComboBox1, dtSupplierActivities) Call Combo(ComboBox2, dtSupplierActivities) Call Combo(ComboBox3, dtSupplierActivities) Call Combo(ComboBox4, dtSupplierActivities) Call Combo(ComboBox5, dtSupplierActivities) Call Combo(ComboBox6, dtSupplierActivities) Call Combo(ComboBox7, dtSupplierActivities) Call Combo(ComboBox8, dtSupplierActivities) Call Combo(ComboBox9, dtSupplierActivities) Call Combo(ComboBox10, dtSupplierActivities) Call Savechanges(dsActivities1, daActivities) Call Savechanges(DsSupplierActivities1, daSupplierActivities) End Sub