Hi,

I am trying to shrink a database using sqldmo.
I get the following errors with this code, in visual basic
5.0

"expected function or variable" with the .shrink word
highlighted blue.

i also took a guess this method is returning a boolean
value upon completion, although books online says its a
method with no return value, but i had to add this or it
said "expected ="

Dim currentDB As SQLDMO.Database
Dim shrinksuccess As Boolean

Set currentDB = New SQLDMO.Database
currentDB.Name = "mydatabase"
shrinksuccess = currentDB.Shrink(-1,
SQLDMOShrink_TruncateOnly)

Set currentDB = Nothing


Could someone direct me to the answer.

thanks

chris