#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    64
    Rep Power
    12

    dotNet not possible to start through network


    I have a VisualStudio .net program on the harddisk of PC-A. Now I want to start this program on PC-B though network-connection with PC-A (I do not want to copy it to the harddisk of PC-B just start it on the harddisk of PC-A). But I get this error:

    Application has generated an exception that could not be handled.
    Process id=0x700(1792), Thread id=0x714(1812)

    If I copy it on the harddisk of PC-B it starts without a problem!

    Must I change something before compieling?
  2. #2
  3. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    793
    Do you have the .net framework on PC-B?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    64
    Rep Power
    12
    Well I found a way (had to change the security options for this folder)but now I have a new problem. I use this program to connect to an Access-Database. The database is in the same folder as the exe.
    Code:
    String* Databasename="mydatabase.mdb";
    GetModuleFileName (NULL, szBuffer, MAX_PATH);
    GetFullPathName (szBuffer, sizeof (szBuffer), szpath, &pFilename);
    szpath[pFilename-szpath]= '\0';
    String* path2=Convert::ToString(szpath);
    String* myDatabase=myDatabase->Concat(path2,Databasename);
    OleDbConnection* DBCONNECTION=new OleDbConnection();
    String* Connect=S"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=XXX;"; 		 
    Connect=Connect->Replace("XXX",myDatabase);
    DBCONNECTION->ConnectionString=Connect;
    As you can see I let the program find the path to the database and use it to connect to it!
    But when I start the program through network my program adds a \ to the beginning of the path
    (so this
    \\44-test\Customer\mydatabase.mdb
    is changed into this
    \\\44-test\Customer\mydatabase.mdb
    )
    Why does it adds this \? How can I prevent it from adding this \?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    64
    Rep Power
    12
    Found the error(forgot to disable a fuction which added the \ )!

IMN logo majestic logo threadwatch logo seochat tools logo