Results 1 to 3 of 3

Thread: Property Procedures in ActiveX dll

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2001
    Posts
    3

    Property Procedures in ActiveX dll

    HELLO EVERYBODY!
    I am creating DLL that will be configured as COM+ component.
    In the DLL I have
    Public Function GetCustData(p_SQL As String, cust_str As String) As ADODB.Recordset.
    I need to create Property Procedures LET and GET for every field of the GetCustData recordset .
    Does anybody know how to do this.
    Thanks in advance.

  2. #2
    Junior Member
    Join Date
    Sep 2001
    Posts
    19
    It seems that it is impossible to create various properties for a certain UserControl by program code,because the number of a published UserControl's property is surely unchangeable. you know, a ActiveX control is based on some basic interfaces.we can regard a UserControl as a class,all its properties and motheds are Members of the class.

    In fact I 'm meeting with a similar problem --how to implement a property like the DataField of a TextBox. I have submit my problem for help,but up to now it is not solved yet. This problem is probably easy for you.so wish for your reply if you can.Thank you very much.

  3. #3
    New Member
    Join Date
    Sep 2001
    Location
    Swindon, UK
    Posts
    11
    Hi,

    Public Function GetCustData(p_SQL As String, cust_str As String) As ADODB.Recordset

    I'm assuming p_SQL is a SQL query or call to a stored procedure. What is cust_str ? Anyway, I again assume this function is called something like this ..


    Dim rstData as ADODB.Recordset
    Dim strSQL as String

    strSQL = "SELECT * FROM Customers WHERE ... etc"
    Set rstData = GetCustData(strSQL, <whatever goes here>)

    .. etc

    you don't then need property procedures "for every field of the GetCustData recordset", because your SQL statement (or stored procedure) contains them, and the returned ADO recordset will as well !!

    am I on the right track here or are you trying to do something completely different ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width