Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DCOM In Visual FoxFro
Message
From
25/11/1998 14:45:04
 
 
To
25/11/1998 04:50:06
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00160821
Message ID:
00161543
Views:
18
>>>1. Can anyone tell me if it's possible to create DCOM servers using VFP. I know it's possible to create OLE (ActiveX) dll's. I've just created one as a quick test and used it successfully from VB.
>>>
>>
>>Yes, when you create a VFP 6.0 .EXE, and class you expose to COM (declare public) are avialable to any ap that can be a COM client. Only difference between COM and DCOM is that with DCOM the server is on a remote machine. You may have to play with the comconfig tool. I have been able to do this is the automation server was on my NT machine, but not when it was on my Win 98 machine. I think I had an older version of DCOM.
>>
>>>2. I've been told that it's not possible to add/edit/delete records in vfp database/tables via ODBC. ie In a VB app If I wanted to open a vfp table and write to it via ODBC, I couldn't. Surely this is not the case!
>>>
>>
>>Smack whoever told you this!
>>
>>BOb
>
>
>Hi Bob,
>
>Thanks for the advice on DCOM.
>
>I'm not sure I explained my self properly regarding writing to vfp tables via ODBC. I know I can build a VFP app and write via ODBC to other data sources (access, excel etc...) But I've been told I couldn't write a VB app for instance and use ODBC to write to VFP tables. In fact another reply in this thread confirms that there is a Knowledgebase article (which I have yet to look for) confirms that this.

That's a big pile of BS, and here's the VB code I tested:
Assumptions:
1) You have created a DSN that points to a free table directory, which is based on the Microsoft Visual FoxPro Driver version 6.0
2) You have a free table called "Temp" that has one field of type character.
Private Sub Command1_Click()
  Dim oCn As New ADODB.Connection
  oCn.Open "DSN=Visual FoxPro Tables"
  oCn.Execute ("Insert Into Temp Values ('whatever')")
  oCn.Close
  Set oCn = Nothing
End Sub
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform