473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

VB6 ActiveX DLL - Exporting a function

Hi,

Currently I have created an ActiveX DLL, which retrieves data from an SQL Server. I m using ADODB.Connection and ADODB.Recordset

I have done the code, and checked and its working perfectly in VB6. This DLL has to be used with Delphi.

How do I export a function in VB6, that is, making an ActiveX DLL to a Windows DLL. I searched in google, but not able to get the exact one which I m looking for.

Can you some one help me in this regard.


Here is my code (ActiveX DLL)

Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim fsr As New FileSystemObject
Dim rslog As TextStream
Dim strSQL, conn2 As String
Dim i, j, k As Integer

conn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=MPSClient;Password=testing;Initial Catalog=WSMDB;Data Source=133.139.43.186"

conn.Open
strSQL = "Select * from MPSJobEvents"
rs.Open strSQL, conn, adOpenDynamic, adLockOptimistic

fsr.CreateTextFile ("JobEvents.csv")
Set rslog = fsr.OpenTextFile("JobEvents.csv", ForWriting)


For i = 0 To 19
rslog.Write (rs(i).Value) ' for trial purpose, i m just dumping the first record alone.
rslog.Write (",")
Next i


rslog.Close
conn.Close
Dec 26 '06 #1
0 999

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Mattt | last post by:
Hi, I've run into a rather odd problem. get Methods seem to return values from the wrong methods! For example, let's pretend my activex control stores values about a person. getName would return...
1
by: Craig | last post by:
I am having problems getting an ActiveX DLL written in VB6 to call a method in a C# class library component. My C# DLL is called CSharpProject.dll and contains a public class called CSharpClass....
3
by: Alan Kosmonov | last post by:
how do we register an activex dll in win98? is regsvr32 sufficient? I want to create an object in asp. it is no problem in win2000 by assignin the dll to the component services COM+ applications.
6
by: Steve Richter | last post by:
I am getting error in a vbscript: ActiveX component cant create object: Excel.Application. The vbscript code is: Dim objExcel Set objExcel = CreateObject("Excel.Application") I am pretty...
2
by: Shawn | last post by:
Hi. I've never created an ActiveX control before, so I know little about what it is capable of and what its limitations are. My problem is this: I have to create a way to send multiple documents...
1
by: Frank | last post by:
Short Version of Question: Can anyone provide an example of how I should embed the ActiveX and license, and then use it in a function?
2
by: bienwell | last post by:
Hi, I have a question about exporting data from datagrid control into Excel file in ASP.NET. On my Web page, I have a linkbutton "Export data". This link will call a Sub Function to perform...
1
by: TraM | last post by:
Hi, I'm trying to develop an ActiveX project, that users can drag their files onto it for uploading to a website using C#. I couldn't find any sample code. How should i start? Thanks in...
3
by: Fab | last post by:
Hi, I have never created an activeX. I have to code one in C#, which tools/ softwares do I need ? Thanks, Fab
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.