Hi joteke, thank you very much .
I have one question to ask :
1. when attach/detach database using osql , we must specified the servername\instance , eg:
osql -E -S servename\instance - i sp_attach.sql
In Vb.net , we can replace the servername with [local] ( if msde is on local), but osql doesnt allow . How to I do it if I want to create a batch file for this command sp that it can run on diffrent machine (assume that the instance is same)