Using VB and SQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • techack
    New Member
    • Nov 2007
    • 2

    Using VB and SQL

    I need a little help from you all. I am making a FMS Project with Oracle @ back end and VB as frontend.

    I have a listbox with 3 options - Term I,II & III. Now, I want that when person chooses term I and clicks on NEXT BUTTON, then a new record should be added in the table (which I have done succesfully with ADODB) but when he chooses Term II or III, the database should be searched by admission no. and then the matching record should be displayed and updated (I haven't been able to do this part).

    I would be highly obliged if you could help me with it.
    Thanks!
    Regards
    Last edited by Killer42; Nov 29 '07, 12:58 AM.
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Originally posted by techack
    I need a little help from you all. I am making a FMS Project with Oracle @ back end and VB as frontend ...
    Hello, techack!

    Should you have a message box to alert user to add admission no?

    Also, I would have Term i, ii, and iii connect in the same manner. Once that's sorted out, I would then suppress getting data specific to Terms ii, and iii with the message box; perhaps as:

    [CODE=VB]Private Sub Updt_Click()
    Dim my_database As Database
    Dim my_record As Recordset
    If (Text1(0) = "") Then
    MsgBox ("Please put in your user id..."), vbOKOnly, "error"
    ElseIf (Text1(1) = "") Then
    MsgBox ("Please put in employee id..."), vbOKOnly, "error"
    Else

    Set my_database = OpenDatabase("C :\DataMining\Da ta_Central.mdb" )[/CODE]

    Your code will be different since you're using Oracle. This is an Access example I had to demonstrate the message box option.

    You should probably keep this check local to VB and not Oracle. I am not sure how this can be handled in Oracle.

    If Text1(0) or namely your combo box on your VB form is selected, the message should ask for added info.

    Hope this help gear you somewhere ;-)

    In a bit!

    Dököll
    Last edited by Killer42; Nov 29 '07, 03:38 AM.

    Comment

    • techack
      New Member
      • Nov 2007
      • 2

      #3
      Originally posted by Dököll
      Hello, techack!

      Should you have a message box to alert user to add admission no?

      Also, I would have Term i, ii, and iii connect in the same manner. Once that's sorted out, I would then suppress getting data specific to Terms ii, and iii with the message box; perhaps as:

      [CODE=VB]Private Sub Updt_Click()
      Dim my_database As Database
      Dim my_record As Recordset
      If (Text1(0) = "") Then
      MsgBox ("Please put in your user id..."), vbOKOnly, "error"
      ElseIf (Text1(1) = "") Then
      MsgBox ("Please put in employee id..."), vbOKOnly, "error"
      Else

      Set my_database = OpenDatabase("C :\DataMining\Da ta_Central.mdb" )[/CODE]

      Dököll
      didn't get ur idea quite rightly. I think u should go through my 1st post again to understand what i m asking

      Comment

      Working...