active x dll help user defined function not identified

Posted on 2004-11-12
Medium Priority
Last Modified: 2013-11-25
I am trying to create an activex dll out of my project. So that I can then call it from an asp web page Here is an example of one of the functions.  When I try to compile it i get the error user defined type not defined
on the dim rs as adodb.recordset and on the dim cmd
actually on all the adodb stuff it bombs out.
Now when I use thios as a regular exe it is fine. I just coppied the coed over into an active x module. I thought that it be just fine. what do I not understand about it?
Can adodb be in the active x dll or not.
Or should the active x dll call the other project?

Public Function ship(ByVal numb As Integer, ByVal shipN As String, ByVal shipc As String, ByVal add1 As String, _
                     ByVal add2 As String, ByVal city As String, ByVal state As String, ByVal zip As String, ByVal country As String, _
                     ByVal amount As Integer, ByVal stroption As String)
Dim intNumbShip As Integer
Dim intupdateNumb As Integer
intupdateNumb = 0

   strShipName1 = shipN
   strCompName1 = shipc
   strAdd11 = add1
   strAdd12 = add2
   City1 = city
   strState1 = state
   intZip1 = zip
   strCountry1 = country
   strShipOption1 = stroption
   intshipAmount1 = amount


Dim rs As ADODB.Recordset
Dim cn As ADODB.Connection
Dim cmd As ADODB.Command
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "shipping", CONNECTIONSTRING, adOpenKeyset, adLockOptimistic, adCmdTable

   rs.AddNew Array("shipPerson", "ship_comp", "ship_Add1", "Ship_Add2", "ship_City", "ship_State", "ship_zip", "ship_Coountry", "ship_Amount", "ship_Option", "customer_ID"), _
                  Array(strShipName1, strCompName1, strAdd11, strAdd12, City1, strState1, intZip1, strCountry1, intshipAmount1, intshipAmount1, intOrderID)
   Set rs = Nothing

thanks for any help
Question by:shayne23d
1 Comment
LVL 32

Accepted Solution

Erick37 earned 2000 total points
ID: 12568791
From the Project->References menu make sure that your database reference is included ("Microsoft Activex Data Objects...").

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question