Results 1 to 3 of 3

Thread: Database Access Through a Custom DLL

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 1999
    Location
    Vancouver, BC, Canada
    Posts
    32

    Post

    I am in the process of creating a DLL, in which I access a SQL server DB and get a recordset. That's all fine, but I want to be able to use this DLL with both a VB application, AND a WordPerfect 8 document (uuuugh..PerfectScript). The problem I have is, I want the results of the DB lookup to be available to both apps, so the data needs to be in a 'friendly' format, readable by both apps. I have successfully returned a disconnected recordset to the VB app, BUT I'm not sure if I can use this same technique from WordPerfect, because I'm not certain if I can create a similar Recordset object in WP (similar to a Recordset object you'd create in a VB form to hold a returned Recordset). I'm thinking I should use a series of Property arrays.

    What's the recommended method for returning a recordset from a custom object, so it's available in a DLL??

    Hope my confusion wasn't too confusing


  2. #2
    Registered User
    Join Date
    Apr 1999
    Location
    Brazil
    Posts
    144

    Post

    In Word97 I use a similar code,
    the function openSQL are stored in a DLL and returns a RecordSet.

    A hope this clear your mind!

    -----

    Private Sub InsertDadosAgenda()

    Dim dbRec As Recordset
    Dim dbDB As Database
    Dim dData As Date
    Dim nMes As Long
    Dim yRange As Range
    Dim r As Long, t As Long
    Dim cReport As String
    Dim cQuem As String
    Dim cCliente As String
    Dim cOponente As String
    Dim cHoraAgenda As String
    Dim cTable As Table
    Dim uDoc As Document

    Set dbDB = OpenDatabase(gNameDB)

    openSQL dbDB, dbRec, cls.SQL() & " ORDER BY Agenda.ageData"

    DoEvents

    With dbRec

    .MoveLast
    t = .RecordCount
    .MoveFirst

    ...

    Boa sorte!
    Jefferson

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 1999
    Location
    Vancouver, BC, Canada
    Posts
    32

    Post

    Hi Jeff,

    What you described is exactly what I have done so far...And I have no problems making this DLL work with VB or VBA. Unfortunately I need to make this application work with WordPerfect 8.0 (which doesn't have VBA support, until version 9.0). So, the problem is, I don't think I can create a recordset in Wordperfect, the same way you described with Word 97. Therefore, I am looking for an alternate way of returning a series of records for Wordperfect to use, without it being in a VB recordset...so, I was thinking about using an array of properties or something like that.

    Anyways, thanks for the reply.

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