Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automation Server
Message
From
14/11/2001 04:38:19
 
 
To
13/11/2001 15:20:57
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00581097
Message ID:
00581366
Views:
15
Hi!

You should use DCOM, not RDS (as far as I know, VFP is designed to work using DCOM). Use DCOMCNFG.EXE to configure DCOM settings. You can also run object from VFP explicitly from remote machine by using CreateObjectEx() function. For example, specify class GUID as first parameter of this function and server name as a second parameter - and you can run your object without ANY special configuring either DCOM or RDS at the client side. This is great advantage because no need in special configuring at each client's workstation. You will need only run the DCOM manager at the server side and specify proper access rights for that object at the server to allow runnign that object from remote machines.

HTH.

>Hello everybody!
>
>I have a problem with my AS. May be someone can give me a hint why it is happening. It is my first try in this area.
>
>I have SQL Server database. I have created a project with my OLE class such as:
>
>DEFINE CLASS Contacts AS Custom OLEPUBLIC
>	strConnect="Provider=SQLOLEDB.1;Initial Catalog=MAPTracks;User ID=sa;Password=;Data Source=192.168.4.10;"
>
>	oConn = .NULL.	
>	oCommand = .NULL.	
>
>	FUNCTION Init()
>		This.oConn = CreateObject("ADODB.Connection")
>		This.oConn.Open(This.strConnect)
>		This.oCommand = CreateObject ("ADODB.Command")
>		This.oCommand.ActiveConnection = This.oConn
>		This.oCommand.CommandType = 1
>	ENDFUNC
>	
>	FUNCTION Request(nContactType)
>		This.oCommand.CommandText = "Request "+ALLTRIM(STR(nContactType))
>		oRec = This.oCommand.Execute
>		RETURN oRec
>	ENDFUNC
>
>	FUNCTION GetContactTypes()
>		This.oCommand.CommandText = "GetContactTypes"
>		oRec = This.oCommand.Execute
>		RETURN oRec
>	ENDFUNC
>	
>	FUNCTION Release()
>		oConn = .NULL.
>		oCommand = .NULL.
>		RELEASE oCommand, oConn
>	ENDFUNC
>
>ENDDEFINE
>
>and build COM server exe.
>
>I copy it on network drive and it is regestered and Regmangr32 alows it to be remotley called.
>
>when a call an instance of this object like
>conact = CREATEOBJECT("AS.Contacts")
>it creates an object
>when I run a method like
>oRec = contact.Request(0) or
>oRec = contact.GetContactTypes()
>It works very fas an firs time but every other second time it hangs up and any when I click on foxpro window or do any activity it gives me a message "Action cannot be completed becuose other program is busy. Switch/Retry"
>It does not metter what I push it 's keep saying that, however after ~1 min it works and brings a right result. It does that only every second time.
>
>Does anybody know what is happening here?
>Thank's in advance.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform