Results 1 to 2 of 2

Thread: Beginner activex dll help

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2007
    Posts
    38

    Beginner activex dll help

    I have a fully functional vb6 script. I want to make it into an activex dll.

    My problem is i make the dll, but I am not sure how i can call the variables in asp, here's what I am trying to do:

    Code:
    Public filelocation As Variant
    Public function getstore()
    
    Open filelocation For Binary As #1
    Get #1, &H5, bytData
    
    miconcnt = "&h" & Hex$(bytData(3)) & Hex$(bytData(2)) & Hex$(bytData(1)) & Hex$(bytData(0))
    
    miconcnt = CLng(miconcnt)
    
    Close #1
    
    Dim conn As ADODB.Connection
             Dim rs As ADODB.Recordset
              Dim conacc As String
              Dim subJID
           
              Set conn = New ADODB.Connection
              Set rs = New ADODB.Recordset
              connclan = "Driver={SQL Server};Server=xxxx;Database=clandb;Uid=sa;Pwd=xxxx;"
    
              conn.Open constore
    
    rs.Open "select * from cl where miconcnt = '" & miconcnt & "'", constore
    storename = rs!storename
    rs.Close
    conn.Close
    End function
    And I am using this to get the value from asp:
    Code:
    <HTML>
    <TITLE>My Cool DLL </TITLE>
    <BODY>
    <%
    dim filelocation
    
    filelocation = "c:\stores\store1023.dat"
    	Set newf=Server.CreateObject("storedll.storeclass")
    
    	finalanswer=newf.getstore(filelocation)
    
    
    	Response.write finalanswer
    %>
    When i do this i get an error saying the method or property doesn't have enough arguements or something.

    What I want to do is response.write storename
    Please help me

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Beginner activex dll help

    You are passing getstore a parameter, but the function does not have any parameters in it.

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