Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I get onto the VB forum -- and use ADO with VFP d
Message
 
To
22/12/2000 17:25:11
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00429555
Message ID:
00456525
Views:
26
>>>>Cetin,
>>>> I know this is an old thread, but I'm trying to figure out how to instanciate the ADODC (not ADODB) in code. The (visual) ADODC com works with the simple stuff being put through it. When attempting to instanciate in code, ODBC errors popup with Provider errors (Error 0?). Note: the ADODC property pane does not offer "Provider" and that the ADO.Refresh call pops these errors. Got any thing to share or shed about ADODC? Is it different from ADODB, or is that a subclass name? :) PS: CommandType is 8 (unknown) and the RecordSource calls a NortWind stored procedure.
>>>>
>>>>>oRecordset = CreateObject("adodb.recordset")
>>>>>oConnection = CreateObject("adodb.connection")
>>>
>>>ADODC (ADO Data Control) is an ActiveX control for data binding. Just another layer of abstraction. In most situations you can do binding without this control. What are you trying to use it for?
>>I'm building a (source) com. I got the ConnectionString to work. Initially,I tried embedding the con-string as a property,but eventually go it to work by passing it as a string (had to use the ado property dialog conection builder). When creating it as an SCX, the connection string only required data source name. However, when doing it in code it required a full connection string, and allowed the string to be forwarded after the ADOCOM was created. This way, a variety of connection strings, Recordsources; stored procedure calls and SQL can be accomodated with one instance of the COM.
>>
>>I used ADODC because that was the only control I could locate in my ActiveX library. I have noted the ADODB, but don't know where he is. About the container: I just just wanted to get a local reference to the recordset. The cantainer is not required (BTW: When the SCX runs, the container doesn't show. The intent was to feed activex navigators, like tree and list, node data. I read about ADODB, but have not not seen the class in my desktop. Also, it seemed that the ADO Primer implied that ADODC was a more recent implementation than DB. Is it packaged with VS?
>>Thanks Terry
>
>For this you can use the ADO recordset directly. Look up MSDN for the ADO recordset object properties and methods, you will find out that the ADODC is just a visual wrapper around it (and other ADO objects).
>
>For example, you can assign the ADO recordset directly to the datasource property of ActiveX controls that support ADO binding. In the files section (classes/vcx) I have a little class that does this with the MS Datagrid ActiveX control.
>
>For detailed information on how to use ADO with VFP read JVP's article "ADO Jumpstart for VFP developers", also on MSDN.
Okee Dokeee - and thanks alot
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform