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