Tuesday, March 27, 2012

Creating...Connecting... i'm missing something...

I'm creating a data storage program in VB 2005 Express. it works perfectly, and installs and everything, but it stores the database in an obscure data file in the user's local settings folder as an mdf file.

once that's created, i want to create an access front-end to view the data, but can't get it to work...

when i try to create linked tables, i establish the connection to sql server (2005 express) through the wizards, but the database i want to connect to isn't in the list of DBs, so i can't connect to it. There's an option to add a database, but it just asks for the name, and i don't know what to tell it, because the file i want is in the obscure data file, and i don't actually know what it's asking for. full path? just file name? no idea...

Here's all the other ways i can think of to add it to the list of DBs in my instance of SQL...

if i open Express Manager to edit the databases in the instance of SQL server, i can create new databases, but i can't seem to add existing databases to SQL Server's list of databases in the instance.

I can use the instance of SQL server to connect to the DB through VB 2005 express's database explorer, but once i close it down, the connection's gone.

when the program is packaged and installed, it automatically creates the link to the database, and it isn't added to SQL Server's list either.

what am i missing? how can i get my Access FE to connect properly to the mdf BE?

Can anyone help me?I think you have ended up using something called user instances, these are dynamically brought online at connect time, to connect to the database from Access it needs to be attached to SQL Server as a regular database.

Lookup sp_attach... in the help file. I also suggest moving the database to the data directorty for SQL Server

No comments:

Post a Comment