Ask Experts Questions for FREE Help !
Ask
    LinfieldPA's Avatar
    LinfieldPA Posts: 32, Reputation: 3
    Junior Member
     
    #1

    May 8, 2011, 11:41 AM
    Visual Basic Code: Familiar with a PATH like this? "//server/data/... "
    I wrote a Visual Basic (5.0) program about 10 years ago and compiled an .exe file when I was done. At the time, the database file it used was on a server and written into the code was this path: "//server/data/systemhistory.mdb".

    I'm now trying to run the same previously compiled program on a stand-alone computer (i.e. no server). Is there some way I can make a local drive, partition, or whatever "appear" as "//server/data/"? If it was compiled using "Q:/data/" or something similar, I could just rename a drive partition "Q:", and stick the database file there... but "//server"?

    I used to be very familiar with what the "//server" meant, but like I said... it was 10 years ago!

    Thanks in advance for any help you can provide.
    Scleros's Avatar
    Scleros Posts: 2,165, Reputation: 262
    Hardware Expert
     
    #2

    May 8, 2011, 04:28 PM
    Quote Originally Posted by LinfieldPA View Post
    I used to be very familiar with what the "//server" meant
    No access to the original source code?

    A UNC path takes the form //ComputerHostName/Folders/Data.

    Workarounds:
    • Rename your current machine "server" and create a shared folder "data" to plop the database in.
    • Setup and network another machine (physical or virtual) named "server" to place the database on.
    • It might also be possible to edit the EXE with a hex editor to change the hardcoded path to another one with the same length.

    Hardcoding paths is always a bad idea.
    LinfieldPA's Avatar
    LinfieldPA Posts: 32, Reputation: 3
    Junior Member
     
    #3

    May 8, 2011, 05:32 PM
    Thanks Scleros! Renaming the machine and sharing a folder worked perfectly (and jogged my memory of what was going on)!

    I'm actually trying to locate all of the correct versions of forms, modules, etc. that were used when I compiled the .exe (I haven't even looked at it for 10 years, the hard drives that contained the files is long gone, and I have multiple floppy backups with different versions).

    I'm trying to run the .exe and compare to the project I'm REbuilding with those forms, etc. to compare it's functionality (it's a fairly complex program).

    (and yes, I knew hardcoding the path would EVENTUALLY come back to bite me in the a**!)

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Visual basic code for calculator [ 8 Answers ]

I am a student at college in somaliland. One of my instructors told me to write a small programme for a calculator in visual basic 6.0. so, I'm stuck with this. Help me with the codes.

Visual basic 6 - Data mismatch [ 5 Answers ]

Private Sub cmdsearch_Click() Dim qry As String qry = "select * from where codeno=" & Val(txtsearchcode.Text) searchheavyfiles.RecordSource = qry searchheavyfiles.Refresh End Sub ========================

Visual basic 6 code [ 2 Answers ]

How to create a simple coding for a system? Means here before this, I do have a system that I create for my assignment... but just then, I reallize that the coding that I code's in the VB6 is too copmplex... sometimes when I read it back, I will deezy too... so if there any tips for this kind of...

Visual Basic Code [ 3 Answers ]

Hi There, I have a VBA macro from work which transfers our reports from one excel sheet to another and then updates itself to particular dates under each user name. I am totally confused how it works... because it doesn't use any kind of link with the file. I have done VB 6.0 and am out of...


View more questions Search