Fred, I changed my class to wrap the CREATE TABLE... SQL command in a BEGIN TRANSACTION... COMMIT TRANSACTION pair and then submitted it via a SQLEXEC()command. The Enterprise Manager still waits indefinitely with an hourglass cursor when I try to open the database. It is able to open the database only after I release the object that I created the table with.
The code to create this table is:
m.lcSQLCommand = ''
TEXT TO m.lcSQLCommand TEXTMERGE NOSHOW PRETEXT 7
BEGIN TRANSACTION
CREATE TABLE Messages
(PrimeKey INTEGER NOT NULL DEFAULT 0,
MsgNo VARCHAR(4) NOT NULL DEFAULT '',
MsgText VARCHAR(254) NOT NULL DEFAULT '')
COMMIT TRANSACTION
ENDTEXT
m.lnResults = SQLEXEC(m.lnHandle, m.lcSQLCommand)
There was no error returned from SQLEXEC() and it did create the table on MS-SQL but I couldn't see it with the EM until I killed the VFP object that created it.
Any thoughts?
Jim White
Time is a wonderful teacher. Unfortunately it kills all of its students.