T
Terry Olsen
I've read in this group that it is much better to open and close the SQL
Connection each time you need to access the database. I need to do a SET
ANSI_WARNINGS OFF in order to insert records, otherwise I get a "string may
be truncated" message (haven't figured this out. I've checked the data
against the columns and the data fits).
Anyway, is it kosher to open the connection, turn off the ansi warnings, do
my insert, and close the connection each time I need to do an insert?
The way my app is currently running is this:
Open the connection
Set Ansi Warnings Off
do various inserts throughout the day as they are needed
Catch the "state changed" event and if the connection closes, then re-open
it and set ansi warnings off again
Close the connection when the app closes.
What's the best method for doing this?
Thanks.
Connection each time you need to access the database. I need to do a SET
ANSI_WARNINGS OFF in order to insert records, otherwise I get a "string may
be truncated" message (haven't figured this out. I've checked the data
against the columns and the data fits).
Anyway, is it kosher to open the connection, turn off the ansi warnings, do
my insert, and close the connection each time I need to do an insert?
The way my app is currently running is this:
Open the connection
Set Ansi Warnings Off
do various inserts throughout the day as they are needed
Catch the "state changed" event and if the connection closes, then re-open
it and set ansi warnings off again
Close the connection when the app closes.
What's the best method for doing this?
Thanks.