View Single Post
Old 11th September 2010, 20:07   #1
Grennvicted
Junior Member
 
Join Date: Sep 2010
Posts: 8
NSis and MSSQL_OLEDB::SQL_ExecuteScript

I have a bit of a problem the SQL scripts that i use are good,they do what they were coded for when they are directly called in MS SQL, but when i call them in a NSis script they either do not execute or return an error. The Ones calling a delete on certain rows of a table always return an error,the ones calling to drop base do not drop because they say that de DB is in use. Here is the big picture, i call a script to create a temporary DB to retrieve the Data of two existing DB then modify the temporary DB(delete some rows on two tables).After, i drop the two existing DB, recreate them, transfer data in those two DB from the temporary one, drop the temporary one.The data transfering goes well both ways,the big issue is i cannot delete rows from the temporary DB and i cannot drop the two existing DB. I had to seperate alot of queries (like the ones using Identity_Insert on /off) to make them work .

1) Is there some kind of protection that prevents Data from being deleted when called from Nsis?

2)Why Nsis says the DB is in use when i put a 10 second sleep before the last insert to drop a DB?


P.S. Remember i doubled check all My queries and they are working perfectly fine when i call them from MS SQL or Access.

Last edited by Grennvicted; 11th September 2010 at 20:20. Reason: Identation
Grennvicted is offline   Reply With Quote