>>What do you mean damage?
>Thanks
>
>An insert or update implies stuff is to be written to a SQL table. The "wizard" has an interface wher the user can enter a SQL statement. If the SQL statement calls an SP or issues an INSERT from the client, there is data in the parameters that is written to the tables. I just want to assure that the statement is syntactically correct (fieldnames - statement structure) without actually writing to the table - and - without actually passing real data and inserting a record into the table.
>
>On the winzard for each statement is a "Test" button the user can click once the statement is in. If the SQL is an INSERT, I would like to assure the user that the statement is syntactically correct (when they press "Test") without actually writting anything to the table.
If it's not syntactically correct (and semantically to an extent, i.e. has misspelled field names), sqlexec() won't do a thing and will return a -1 anyway.
>With SELECT statements I can test without having to "gather" data - I can make select return a zero record cursor. I am looking for a "zero" action insert!
I thought SqlPrepare() would actually compile and return some status, but it returns 1 for any gibberish you pass to it... but then, I got another bright idea: if your user clicks the TEST button, why don't you really send the command to the server, just wrapped into a begin transaction / rollback? No harm done that way, and you actually do get some status back.