Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my code
- -------
- ada.Fill(ds, "reports.renewal_contact_t ")
- ds.Tables(0).DefaultView.RowFilter = " PHONE NOT like'0'"
- dt = ds.Tables(0)
- For Each q In dt.Rows
- chkphone = q("PHONE").ToString
- chkdphone = Regex.Replace(chkphone, "[^d]", "")
- 'MessageBox.Show(chkdphone)
- If (chkdphone.Length = 10) Then
- Dim anyRow As DataRow = dt2.NewRow
- anyRow(0) = chkphone.ToString
- dt2.Rows.Add(anyRow)
- ElseIf (chkdphone.Length >= 10) Then
- rsltstring = chkdphone.Substring(chkdphone.Length, -10)
- Dim anyrow1 As DataRow = dt2.NewRow
- anyrow1(0) = rsltstring.ToString
- dt2.Rows.Add(anyrow1)
- Else
- End If
- Next
- new_ds.Tables.Add(dt2)
- ComboBox1.DataSource = new_ds.Tables(0)
- ComboBox1.DisplayMember = "PHONE"
- Error
- -----
- length cant be less than zero parameter name length
- rsltstring = chkdphone.Substring(chkdphone.Length - 10, 10)
- rsltstring = chkdphone.Substring(chkdphone.Length - 10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement