Domino Code Fragment

Code Name*
ODBC Connection With Message Box to ask for ODBC DATA Source.
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.139.90.131
Description*
During ODBC Connection gets Data Source from User.
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
 '-- Define Variables For Making ODBC Connection
    Dim Con As New ODBCConnection
    Dim WhatODBC As String
   
    '-- Loop until Input of ODBC Data Source is Valid
    Do While Con.GetError <> DBstsSUCCESS
         
         'Get the name of the ODBC Data Source from the user
         WhatODBC = Inputbox("Enter The Name Of the ODBC DataSource, Enter Q to Quit")
         
         '--Make ODBC Connection          
         RetCode% = Con.ConnectTo(WhatODBC)
         
         '--Output Message On ODBC Data Source Connection Error
         If  WhatODBC = "Q" Then
              Exit Do
         Elseif WhatODBC = "q" Then
              Exit Do
             
         Elseif Con.GetError <> DBstsSUCCESS Then        
              Messagebox("Not A Valid ODBC Data Source, Either Input Valid ODBC Data Source or Hit Enter To View Data Sources.")
         End If
       
    Loop