Hi Folks,
I have finally discovered a method of connecting VB 5 forms to SIEBEL. Its through COM. However the trouble that follows is much more painful.

Firstly you need to do a fresh siebel client installation.

Secondly the form crashes after doing a retrieval for the first time. Something is going very wrong. I am posting the code in case someone manages to see whats wrong.

Cheers,
Abhijit

VB Code:
  1. Private Sub CommandButton1_Click()
  2. Dim errcode As Integer
  3. Dim SApp As SiebelApplication
  4. Dim siebBusObj As SiebelBusObject
  5. Dim siebBusComp As SiebelBusComp
  6. Dim Name As String
  7. Dim error As String
  8. Dim myacc As String
  9.  
  10. ChDrive "D:"
  11. ' Use your installation directory
  12. ChDir "D:\Siebel77\Client\BIN"
  13. Set SApp = CreateObject("SiebelDataServer.ApplicationObject")
  14.  
  15.  
  16.  
  17. With SApp
  18.   .LoadObjects "D:\Siebel77\Client\BIN\ENU\siebel.cfg,ServerDataSrc", errcode
  19. If errcode = 0 Then
  20. TextBox1.Text = "Load Successfull" & SApp.GetLastErrText
  21.     .Login "SADMIN", "SADMIN", errcode
  22. If errcode = 0 Then
  23. TextBox1.Text = "Login Successfull" & errcode & SApp.GetLastErrText
  24. 'Creat A Business Object
  25. Set siebBusObj = SApp.GetBusObject("Quote", errcode)
  26. If errcode = 0 Then
  27. TextBox1.Text = "BO Craetion Successfull" & SApp.GetLastErrText
  28. 'Create a Business Component
  29. Set siebBusComp = siebBusObj.GetBusComp("Quote", errcode)
  30. If errcode = 0 Then
  31. TextBox1.Text = "BC Craetion Successfull" & SApp.GetLastErrText
  32. With siebBusComp
  33. .ClearToQuery errcode
  34. .ActivateField "Account", errcode
  35. .ActivateField "Opportunity", errcode
  36. .ActivateField "Id", errcode
  37. .SetSearchSpec "Id", TextBox2.Text, errcode
  38. .ExecuteQuery True, errcode
  39. If .FirstRecord(errcode) Then
  40. TextBox3.Text = .GetFieldValue("Opportunity", errcode)
  41. TextBox4.Text = .GetFieldValue("Account", errcode)
  42. If errcode = 0 Then
  43. TextBox1.Text = "Transaction Completed Successfully"
  44. End If
  45. Else
  46. TextBox1.Text = "No Records Found. Please Enter a valid Quote #"
  47. End If
  48. End With
  49. Else
  50. TextBox1.Text = "BC Craetion Failed" & errcode & SApp.GetLastErrText
  51. End If
  52. Else
  53. TextBox1.Text = "BO Craetion Failed" & errcode & SApp.GetLastErrText
  54. End If
  55. Else
  56. TextBox1.Text = "Login Failed" & errcode & SApp.GetLastErrText
  57. End If
  58. Else
  59. TextBox1.Text = "Could Not Load" & "  " & errcode & SApp.GetLastErrText
  60. End If
  61. End With
  62. End Sub