By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,986 Members | 1,487 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,986 IT Pros & Developers. It's quick & easy.

Using VB and SQL

P: 2
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
Nov 28 '07 #1
Share this Question
Share on Google+
2 Replies


Dököll
Expert 100+
P: 2,364
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:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Updt_Click()
  2.    Dim my_database As Database
  3.    Dim my_record As Recordset
  4. If (Text1(0) = "") Then
  5.    MsgBox ("Please put in your user id..."), vbOKOnly, "error"
  6. ElseIf (Text1(1) = "") Then
  7.    MsgBox ("Please put in employee id..."), vbOKOnly, "error"
  8. Else
  9.  
  10. Set my_database = OpenDatabase("C:\DataMining\Data_Central.mdb")
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
Nov 29 '07 #2

P: 2
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:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Updt_Click()
  2.    Dim my_database As Database
  3.    Dim my_record As Recordset
  4. If (Text1(0) = "") Then
  5.    MsgBox ("Please put in your user id..."), vbOKOnly, "error"
  6. ElseIf (Text1(1) = "") Then
  7.    MsgBox ("Please put in employee id..."), vbOKOnly, "error"
  8. Else
  9.  
  10. Set my_database = OpenDatabase("C:\DataMining\Data_Central.mdb")
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
Nov 29 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.