Approach User Support homepage Approach User Support
Answers to Frequently Asked Questions about Lotus Approach
Examples LotusScripts
Example databases
Links to other Lotus Approach support services

[Return to contents]

Example LotusScript: SQL delete

Last updated: before December, 1998

This example LotusScript deletes all rows from the table fg_orders. A WHERE clause or any other SQL statement can also be included. You could also create a stored procedure that accepts a parameter. Note that as far as anyone can tell the query method cannot accept return values.

'Submitted by Jerry Sikes
Dim  con2 As New connection
        Dim  QRY2 As New query
        Dim RS2 As resultset
        If (CON2.connectto("SQL Server", "uid","pwd" , "jaxcnvq1")<>False)Then
                Set QRY2.CONNECTION = CON2
                qry2.sql = "Delete fg_orders"
                If Not (qry2.execute) Then
                        Msgbox "Not success"
                        Goto TheEnd
                End If
                Msgbox "Success"
        End If

[Return to contents]

© Copyright, JohnBrown, Trademarks, Disclaimer, Acknowledgements.