General information
Category:
COM/DCOM and OLE Automation
>Good morning.
>How can I access a SQL Server's data from a COM ?
>SQL Passthrough ? Is there a better way than SQLPT ?
>Should I create remote views in a DBC and call them from the COM (I d'ont know if this is possible...) But then, if I have to modify the remote view online, It is a little bit complicated.
>
>I am developping on the client-server architecture right now.
>I would like to go to n-tier development but have a lot of questions on how I should access the data. I read a lot of book and magazines on COM and got it all, it is just that little step that I need to understand.
>
>I want to implement a COM Server, a SQL Server as backend and a Visual Foxpro interface from start.
>
>When I look at some samples of COM accessing data, it is always on Visual Foxpro native data sample I see.
>
>Any clues for me ?
>
>Thanks.
>
>André
You can do several things here. Remote views would not be of much help if you are thinking about it in the usual Client/Server way (updatable views) since foxpro cursors cannot travel back and forth among the tiers.
One option would be to use XML. You can use SPT to get and write data from the COM server and convert to XML to send and receive from the client. You can do this on VFP5/6 with third party tools or natively with VFP7. (built-in functions to convert cursors<->xml)
Another option would be to use ADO and disconnected recordsets. With this option you can pass the recordset from the COM server to the client and back, no conversion necessary.
Those are two that come to mind, most probably others will chip-in with more ideas.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only