I've a nsf file with a lotusscrip reading and writing an oracle table.
It worked till some days ago, but yesterday gave me an error.
Here's the lotusscript:
Uselsx "*LSXODBC"
Sub Initialize
On Error Goto GestError
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim con As New ODBCConnection
Dim qry As New ODBCQuery
Dim result As New ODBCResultSet
Dim datasource As String
' definizioni variabili per caricamento nella sql
Dim varsql As String
Set qry.Connection = con
Set result.Query = qry
datasource = "helpdesk"
username = "******"
password = "******"
If Not con.ConnectTo(dataSource, userName, password) Then
Messagebox "errore nella connessione a " & datasource,, "Error"
Exit Sub
End If
'disabilito autocommit
con.Autocommit=False
Set uidoc = workspace.CurrentDocument
account = uidoc.FieldGetText( "UtenteNT" )
varSQL = "SELECT * FROM HD_ANAG "
varSQL = varSQL + "WHERE ACCOUNT = '" + account + "' "
varSQL = varSQL + "OR ACCOUNT ='" + Ucase(account) + "' "
qry.SQL = varsql
result.Execute
If result.IsResultSetAvailable Then
varaccount = result.getvalue("ACCOUNT")
result.Close(DB_CLOSE)
Dim boxType As Long, answer As Integer
boxType& = MB_YESNO + MB_ICONQUESTION
....//....
here there's the code for writing oracle table
......//......
fine:
con.Disconnect
Exit Sub
GestError:
Messagebox "Si sono verificati errori, dati non inseriti" &
Str(Err) & ": " & Error$
con.Rollbacktransactions
If Err=13 Then
Messagebox "Verifica che siano compilati tutti i campi dei dati
rilevati dall'anagrafica, in caso negativo clicca su 'verifica dipendenti'"
End If
Resume fine
End Sub
This is the error:
"Si sono verificati errori, dati non inseriti 720: LS:DO- ODBC could not
complete the requested operation"
Somebody can helpme?
Thank's!!
The path was dirty (all the folder were doubled), now it's clean and all
working good!