Search code examples
asp.netsqlsql-server-expresssqlcmd

How to Import MicroSoft Access Database (mdb) into SQL Express File using SQLCMD?


For some reason neither SQL managment studio nor import and export wizard works on my friends network due to some security policy

i asked a question about OSQL two days ago and StackOverflow guys told me it is going to be obselete and that i should use SQLCMD instead.

now i am stuck with this screen and cant do anything :(

alt text

to cut long things short my question is very precise:

using SQLCMD..

1-need to import and export command from AND to MDB/MDF

2-need attach / detach commands


Solution

  • mokokamello

    below is how to attach new database and make sure your database is attached

    alt text

    you also will need to check these links

    http://msdn.microsoft.com/en-us/library/ms165673.aspx

    http://msdn.microsoft.com/en-us/library/ms188031.aspx AND THE MOST IMPORTANT LINK

    http://support.microsoft.com/kb/224071

    if you want to dettach

    sp_detach_db DatabaseName
    Go