Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

PreviousPrevious NextNext


Matt Huang 7.Mar.14 03:33 AM a Web browser
Applications Development 6.5 Windows XP


I want to connect Progress Database via LSX. Following is my code.I can create the connection and query the data successfully,but when trying insert data into the table(No matter use standard syntax : resultSet.AddRow and resultSet.SetValue and resultSet.UpdateRow or execute SQL statement directly),it occur a error 500.I try to indicate what the error code means from Lotus help,but fail.Is there anyone can kindly tell me what happen and give me solutions.Thanks in advance.

Option Public
Option Declare
Uselsx "*LSXODBC"


Sub Initialize

On Error GoTo errorHandler

Dim session As New NotesSession
Dim db As NotesDatabase
Set db=session.Currentdatabase
Dim con As New ODBCConnection
Dim qry As New ODBCQuery
Dim result As New ODBCResultSet
Call con.ConnectTo("DBPROGRESS","UserName","Password")
Dim sqltmp As String
Dim errorcode1 As Integer
Dim errorMessage1 As String
Dim extendedMessage1 As String

If Not con.IsConnected Then
Messagebox "Could not connect to PROGRESS",,"No connection"
Exit Sub
End If

Set qry.Connection=con
Set result.Query=qry

sqltmp$=|SELECT * FROM OWNER.TABLENAME|
qry.SQL=sqltmp$
result.Execute
If Not result.IsResultSetAvailable Then
Messagebox "Couldn't get result set",, "No data"
con.Disconnect
Exit Sub
End If

Call result.AddRow
Call result.SetValue("EMP_NO","AAA")
Call result.SetValue("EMP_NAME","BBB")
Call result.UpdateRow

result.Close(DB_CLOSE)
con.Disconnect
Exit sub

errorHandler:

errorcode1%=result.GetError
errorMessage1$=result.GetErrorMessage(errorcode1%)
extendedMessage1$=result.GetExtendedErrorMessage(errorcode1%)

Exit Sub

End Sub








  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite