Manage Learn to apply best practices and optimize your operations.

ODBC connection to external database

ODBC connection to external database

This is a general way to connect any external database through LotusScript using system DSN. For DECs, you need a particular connector for an application in regards to CRM application or a Web enabled application with a strong back-end. For example, for complainttype mastertableu you use the following code.
Dim status As String
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim firstName As String
Dim lastName As String
Dim msg As String
On Error Goto errorHandler
	
	
	Set uidoc = workspace.CurrentDocument
	
	status = con.ConnectTo("ananta", "crm", "crm")
	
	qry.SQL = "SELECT * FROM complaint_type_master"
	result.Execute
	result.AddRow
	
	firstname = uidoc.FieldGetText( "complainttypeid" )
	lastname= uidoc.FieldGetText( "description" )	
	'deptname= uidoc.FieldGetText( "groupadmin" )	
	
	Call result.SetValue("complainttypeid", _
	firstname)
	
	Call result.SetValue("description", _
	lastname)
	
	'Call result.SetValue("groupadmin", _
	'deptname)
	
	result.UpdateRow
	con.AutoCommit = True
	result.Close(DB_CLOSE)
	
	con.Disconnect
	
	Call uidoc.FieldSetText( "firstname","" )
	Call uidoc.FieldSetText( "lastname","" )
	'Call uidoc.FieldSetText( "groupadmin","" )
	
	Exit Sub
errorHandler:
	
	Messagebox result.GetExtendedErrorMessage,, result.GetErrorMessage
	Exit Sub

Dig Deeper on Domino Resources - Part 7

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close