Click here to Skip to main content
15,889,266 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi to all vb masters out their,I'm new here and i just want to know the code in vb6 to detach the database in sql 2000 for metocopy the .mdf.. please help! this is for my school project...thanks in advance..
Posted
Updated 11-Feb-10 23:12pm
v2

Why is your school teaching VB6 ? It's been obsolete for close to a decade, and was always rubbish. You should deal with your course, then forget as much VB6 as you can, it's actually better for you to learn real languages without VB6, than to know VB6 first.

The SQL to detach a database can be executed by the same code that runs any other SQL, AFAIK. That's true in all the languages I've used.
 
Share this answer
 
this is the format:

sp_detach_db [ @dbname = ] 'dbname'
[ , [ @skipchecks = ] 'skipchecks' ]

& an example:

EXEC sp_detach_db 'pubs', 'false'

who can say, some day vb6 will return with a vengeance in the way perl did...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900