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

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close