Connect to a sql database

  • Hello people I have few questions...

    I made a very nice Query that I collects data from our SQL database 2008 R2.

    Now I would like to make a Windows Forms application (VB) that do the same thing but I can control the parts of the query with buttons from my application.

    I used a copy of our backup files. "myDB.bak" but changed it back to ".mdf" and then I data connections I did add a "Microsoft SQL server Database File"

    but I got a error message

    I have been looking on a couple videos on youtube there people copying databases.

    Do someone recommend a good tutorial (a safe tutorial for Windows server 2008 R2) that I could follow to copy a database file then connect the copied database file into my vb project?

    Thank you in advance

  • A backup is not an mdf its a bak.

    If you need the mdf, restore the database and detach it from the server and point to the restored mdf file.

    Out of interest why are you connecting directly to the file instead of going to the SQL Server?

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply