Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

To Createobject on server or some remote machine. 1

Status
Not open for further replies.

nsvreddy

Programmer
Aug 17, 2000
6
IN
Hi all

Using Createobject function we can create an object.
In order to create the object in the server we have to mention the server name in the option paramenter for server name.

I want to create a file system object in server and from that I want to create some folders.


The code I'm using for this is :

Dim FS As Object
Dim a As Object

Set FS = CreateObject("Scripting.filesystemobject", "server")
Set a = FS.createtextfile("C:\testfile.txt", True)
a.writeline ("This is a test")
a.Close

I had all the access rights with the server machine "server".
If I am not giving the server name, the object is getting created on the local machine which is ofcourse obvious and according to the functionality of the createobject function.

But when I'm giving the server name "server" , then I'm getting the runtime error 429 stating that 'Activex component can't create object" some thing.

one more thing I would like to mention here is that my machine is running on windows 98 and server is running on windows NT and are connected using Local Area Network.

Using Local Area Network means we can mention the path using "\\server\c\testfile.txt" and it is ofcourse working fine.

But What I need is to get the functionality under ideal situations. i.e., server may not be located locally ( I mean in our LAN.).

Any help or information regarding this will be highly appreciated. [sig][/sig]
 
What-ho,

OK, here's a guess... Error 429 usually (in my experience) occurs when either the DLL relevent to the object you are trying to create is not available or it is not referenced. Check that the DLL is there on the remote machine so that you can create an object from it...also, try doing this from the command line on the remote machine[/b (that is, the machine where the error is occuring)]:

regsvr32 <your dll name>.dll

Although you're creating the object from a remote machine, the object library (namely, the dll in question) has to be available and referenced properly local to where the object will be created...as far as I know.


If that doesn't work...have you tried turning it off and turning it back on again? :) (just joking)


Toodle-pip,

Paul [sig][/sig]
 
Hi NFI
Thanks for the information.. I will have to try this..I was n't even thought of this...



[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top