mercredi 23 avril 2014

Reconnecting to .MDF after moving code to new machine?


Vote count:

0




So, I'm using VB 2008 Express, and I'm no database expert but I had an app in development that was working just fine throwing data back and forth with a local .MDF file. (I can write queries, but connection and security aren't my expertise at all. Once I get it working I've always just conveniently forgotten all that stuff as I focus on software development.)


Well, my motherboard died. Of course I have a backup. The dead machine had a 32-bit install of WinXP. (Yes, I know some may hate me for still having XP, but let's have that conversation another time, k?) The new box has a 64-bit install of Win7.


First I installed VB2008 Express (Yes I know there are later versions -- I'll upgrade later k?) Then I loaded my app. So far so good.


First thing I notice is my connection string was hard coded to expect the *.MDF to be on another drive. (Intending to remove the hard coding later.) So, no problem, I'll just modify the connection string right?


Nope. I created this .MDF and its corresponding connection string a very long time ago so I had totally forgotten how it was set up. The old connection string included "Integrated Security=True" which I know means Windows authentication. So I suspect this may be the reason I'm getting error 26: "Error Locating Server/Instance Specified" (plus other text describing error 26.


Does this mean my .MDF is only set up to work on the old machine, or using the old windows logon? If so, can I get my data structure back even if I don't remember my old Windows logon or password? (My old machine was configured to log on automatically upon boot, so I never actually needed it.)


ALSO: The old machine had SQL Server 2005 Express installed and I have not done so on the new machine. I'm pretty sure VB 2008 Express is natively able to work with and graphically modify the structure of tables in .MDF files, and the installation of SQL really seemed to affect my boot time. I never had to interact with it directly because I could do everything I needed within the Visual Studio interface. So.... I'd rather avoid installing SQL Server is possible, but could the absence of SQL server be the cause of my woes?



asked 20 secs ago






Aucun commentaire:

Enregistrer un commentaire