skbalahere
New member
- Joined
- Nov 10, 2008
- Messages
- 1
- Programming Experience
- 1-3
am having the database backup from sql server 2000 and have to restore it to sql express 2005 i cant able restore it
the code i use is
qry = "IF NOT EXISTS (SELECT * FROM sysdatabases where name='mydatabase') restore with move database mydatabase from disk='" & Application.StartupPath & "\database.bak'"
cmd = New SqlCommand(qry, con1)
con1.Open()
cmd.ExecuteNonQuery()
con1.Close()
am using vb.net and my machine is xp sp2
Please help
the code i use is
qry = "IF NOT EXISTS (SELECT * FROM sysdatabases where name='mydatabase') restore with move database mydatabase from disk='" & Application.StartupPath & "\database.bak'"
cmd = New SqlCommand(qry, con1)
con1.Open()
cmd.ExecuteNonQuery()
con1.Close()
am using vb.net and my machine is xp sp2
Please help