"Loading/Suspecing" I can not create sql database when I call stored procedure from VB6.

greenspun.com : LUSENET : SQL Server Database Administration : One Thread

I can run this example from sql query analyzer. BACKUP DATABASE Northwind TO DISK = 'c:\Northwind.bak' RESTORE FILELISTONLY FROM DISK = 'c:\Northwind.bak' RESTORE DATABASE TestDB FROM DISK = 'c:\Northwind.bak' WITH MOVE 'Northwind' TO 'c:\test\testdb.mdf', MOVE 'Northwind_log' TO 'c:\test\testdb.ldf' GO

But when I create it in stored procedure and call from VB6 It show the gray database symbol TestDB(Loading/Suspecting). Why it can not run from VB6 ?

-- Anonymous, June 14, 2004



I tested your code in Query Analyzer. That worked, provided the C:\test directory already exists. Then I verified that the code works when put in a stored procedure. Then I verified that running from VB6 leaves it in the loading state.

Unfortunately, I have not found a workaround for this.

Good Luck,


-- Anonymous, June 17, 2004

Moderation questions? read the FAQ