|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
Do you have the .net framework on PC-B?
|
|
#3
|
|||
|
|||
|
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 \? |
|
#4
|
|||
|
|||
|
Found the error(forgot to disable a fuction which added the \ )!
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > .Net Development > dotNet not possible to start through network |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|