3 Replies - 481 Views - Last Post: 17 December 2011 - 11:06 AM Rate Topic: -----

#1 sang84119  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 16-December 11

[Question]How can I Filer a table in database and copy to other table

Posted 16 December 2011 - 07:03 AM

I'm working with the project that require save all user personal information in one table when they login the my system. The problem is too many users login my system per day, it's very hard to manage. So, I want to add one more function which can specify one user information. My solution is filter that user and copy to other table, the problem is I don't know how to do that.
Another question is how can I delete all information in a table in database?
Could you plz help me!

P/s: sorry for my poor English.

Is This A Good Question/Topic? 0
  • +

Replies To: [Question]How can I Filer a table in database and copy to other table

#2 sang84119  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 16-December 11

Re: [Question]How can I Filer a table in database and copy to other table

Posted 16 December 2011 - 07:18 AM

Me.IDList1BindingSource.Filter = "[ID Number] = '" & Me.ID_NumberTextBox.Text & "'"
        '=====================add info into history table==============
        historywindow.HistoryTableTableAdapter.Insert(Me.NameTextBox.Text, Me.gateInfoTextBox.Text, Me.timeTextBox.Text, Me.ID_NumberTextBox.Text)

        historywindow.HistoryTableTableAdapter.Fill(Me.GUIVer7DataSet.HistoryTable)
        '==============================================================

Was This Post Helpful? 0
  • +
  • -

#3 sang84119  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 16-December 11

Re: [Question]How can I Filer a table in database and copy to other table

Posted 16 December 2011 - 07:22 AM

Me.IDList1BindingSource.Filter = "[ID Number] = '" & Me.ID_NumberTextBox.Text & "'"
        '=====================add info into history table==============
        historywindow.HistoryTableTableAdapter.Insert(Me.NameTextBox.Text, Me.gateInfoTextBox.Text, Me.timeTextBox.Text, Me.ID_NumberTextBox.Text)

        historywindow.HistoryTableTableAdapter.Fill(Me.GUIVer7DataSet.HistoryTable)
        '==============================================================


Sorry because of problem in my internet connection.
I also try the above code to filter out the user information, but the problem is one user can login many time per day. The above solution can just filter one time.
Was This Post Helpful? 0
  • +
  • -

#4 sang84119  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 16-December 11

Re: [Question]How can I Filer a table in database and copy to other table

Posted 17 December 2011 - 11:06 AM

Finally, I found the solution, I just use the code: Me.IDList1BindingSource.Filter = "[ID Number] = '" & ID_NumberTextBox.Text & "'" to filter and display on DataGridView after that using some code to print DataGridView and that's it... it's very simple, I don't need to copy anymore

Thank you guys taking time for my question.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1