You need to be inside a transaction for commands like SQLCommit, SQLRollback to make effect.
I believe that, in Oracle, if you don't start a transaction explicitly, each SQLExec will automatically start and end its own transaction -- making the call to SQLCommit unnecessary.
Take a look at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfoxtk00/html/ft00i6.aspto see how to make use of transactions in VFP client/server app.
>I was working with the following code:
>** Send the SQL statement to the Oracle database
> returnValue=sqlexec(gnOracleConnection, sqlString)
>
> if returnValue=-1 then &&if sqlexec failed
> errormessage = "The Oracle connection gnConnection value is " + str(gnOracleConnection) + chr(13)
> errormessage = errormessage + "The error number should be " + str(error())+ chr(13)
> errormessage = errormessage + "The error message should be " + message() + chr(13)
> errormessage = errormessage + "The ticket number being updated was " + alltrim(RECORDNUM) + chr(13)
> messagebox(errormessage)
> return
> endif
>
> sqlcommit(gnOracleConnection)
>
>where sqlstring is a SQL command and gnOracleConnection was earlier defined as STORE SQLCONNECT('dsn', 'username', 'password') ;
> TO gnOracleConnection.
>
>I commented out the line sqlcommit(gnOracleConnection) and the program still added the records to the database. What's the point of the sqlcommit?
Hector Correa