My tquery.unprepare statement crashes my program. My order of operations is this:
1. create
2. databasename:='database'
3. sql.add
4. prepare
4. open
5. Loop until eof
6. close
7. unprepare (blows up here)
8. free (never gets here)
Does anyone know of a reason why this may happen? I have other querys that use the same logic in this program and they all work alright. The only thing I'm doing different is passing the self object from the procedure to the function containing the code I'm referencing as a TComponent and using this TComponent parameter in the create statement. Any help would be great!
1. create
2. databasename:='database'
3. sql.add
4. prepare
4. open
5. Loop until eof
6. close
7. unprepare (blows up here)
8. free (never gets here)
Does anyone know of a reason why this may happen? I have other querys that use the same logic in this program and they all work alright. The only thing I'm doing different is passing the self object from the procedure to the function containing the code I'm referencing as a TComponent and using this TComponent parameter in the create statement. Any help would be great!